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

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 1 17:13:42 PDT 2020


thopre added a comment.

In D79013#2014703 <https://reviews.llvm.org/D79013#2014703>, @jhenderson wrote:

> LGTM, with the two error message fixes. I'd appreciate @thopre's input on the numeric variable usage too, but that shouldn't block this landing.


%x and %X deliberately don't match the 0x0* prefix to allow:

- matching plain hex number without 0x prefix
- testing the actual number of leading zeros in case a tool use leading zero to align numbers for instance

It might be useful to introduce a precision syntax a la printf to specify how many leading zeros are allowed, as well as a --canonicalize-numvar-leading-zero or better named option which would allow matching as many leading zeros. Leading zeros are allowed in immediates though since that has no impact on what is matched, hence why #FOO+0x00018 is allowed.

Let me know if you need further clarification.


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

https://reviews.llvm.org/D79013





More information about the llvm-commits mailing list