[PATCH] D79013: [llvm-readelf] - Do not crash when the PT_INTERP has an invalid offset.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 03:40:11 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/gnu-phdrs.test:327
+# ERROR-INTERP-NEXT: INTERP         0x000[[#OFFSET + 2]]
+# ERROR-INTERP-NEXT: warning: '[[FILE]]': unable to read program interpreter name at offset 0x232: it is not null-terminated
+# ERROR-INTERP-NEXT: INTERP         0x000[[#OFFSET + 3]]
----------------
grimar wrote:
> jhenderson wrote:
> > Don't forget to update `0x232` to `0x[[#OFFSET+2]]` and similar in the messages below.
> > Don't forget to update 0x232 to 0x[[#OFFSET+2]] and similar in the messages below.
> 
> Now I am not sure we want it. I **guess ** it will accept both `0x0000000000232` and just `0x232`, does not seem we want it.
I think it's okay for either. I don't think it matters whether we have leading zeroes or not in the error messages, personally. Also, as we've seen above, the leading zeroes aren't matched anyway, right? ;)


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

https://reviews.llvm.org/D79013





More information about the llvm-commits mailing list