[PATCH] D62898: [llvm-objcopy] - Emit error and don't crash if program header reaches past end of file.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 06:05:55 PDT 2019


grimar added inline comments.


================
Comment at: test/tools/llvm-objcopy/ELF/invalid-p_filesz.test:7
+# RUN: not llvm-objcopy %t.o 2>&1 | FIleCheck %s
+# CHECK: error: program header at offset 440 of size 1048576 is mailformed.
+
----------------
jhenderson wrote:
> Could the numbers be in hex? I feel like those are more natural.
> 
> Also, there are a couple of typos. 1) FIleCheck has a capital 'I' in it spuriously, and "mailformed" should be "malformed".
> 
> I'd probably change the message slightly to say "with offset 0x1234 and file size ..." (because the program header is not at an offset, it has an offset field, and there are two sizes in program headers).
Yeah.. I guess I wanted to start from "program segment at offset ..."


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62898/new/

https://reviews.llvm.org/D62898





More information about the llvm-commits mailing list