Hi Dingbao,
If you build binutils-2.25 with ubsan (require gcc-4.9 or clang-3.3)
and execute command: readelf -a test_file (test files are in the
attachment).
You will see 3 runtime errors:
readelf.c:1543:39: runtime error: negation of -9223372036854775808 cannot
be represented in type 'bfd_sig
Dear developers,
I have found 3 undefined behaviors in readelf.
If you build binutils-2.25 with ubsan (require gcc-4.9 or clang-3.3)
and execute command: readelf -a test_file (test files are in the
attachment).
You will see 3 runtime errors:
readelf.c:1543:39: runtime error: negation of -92233720