[PATCH] D77147: [llvm-readobj] - Do not crash when SHT_HASH table is broken.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 10:53:01 PDT 2020
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Thanks!
================
Comment at: llvm/test/tools/llvm-readobj/ELF/hash-histogram.test:116
+
+## Each SHT_HASH section starts from two 32-bit fields: nbucket and nchain.
+## Check we report an error when a DT_HASH value points to a data that has size less than 8 bytes.
----------------
starts with
================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:2619
+
+ // Each SHT_HASH section starts from two 32-bit fields: nbucket and nchain.
+ // Hence the length of a hash table can't be less than 8 bytes.
----------------
starts with
I think "Hence the length of a hash table can't be less than 8 bytes." is naturally inferred from the first sentence.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77147/new/
https://reviews.llvm.org/D77147
More information about the llvm-commits
mailing list