[PATCH] D80215: [llvm-readelf] - --elf-hash-histogram: do not crash when the .gnu.hash goes past the EOF.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 04:18:11 PDT 2020


grimar marked an inline comment as done.
grimar added a comment.

This patch still depends on D80204 <https://reviews.llvm.org/D80204>, I'll address other comments after.



================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2703-2706
   W.printNumber("Num Buckets", GnuHashTable->nbuckets);
   W.printNumber("First Hashed Symbol Index", GnuHashTable->symndx);
   W.printNumber("Num Mask Words", GnuHashTable->maskwords);
   W.printNumber("Shift Count", GnuHashTable->shift2);
----------------
jhenderson wrote:
> I note that `printHashTable` doesn't print any information at all if the hash table is bad, but this prints the header information. Perhaps (in a follow-up), `printHashTable` could be changed to print the header information like here?
Yes, I've noticed this difference too when wrote this patch. I've addressed this and above comment here: D80373


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

https://reviews.llvm.org/D80215





More information about the llvm-commits mailing list