[PATCH] D79853: [llvm-readobj] - --gnu-hash-table: do not crash when the GNU hash table goes past the EOF.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 14 00:29:53 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with one suggestion.



================
Comment at: llvm/test/tools/llvm-readobj/ELF/gnuhash.test:323-324
+## Check we report a proper warning when a hash table goes past the end of the file.
+# RUN: yaml2obj --docnum=1 -D MASKWORDS=4294967295 -D NBUCKETS=3 %s -o %t.err.maskwords
+# RUN: yaml2obj --docnum=1 -D MASKWORDS=2 -D NBUCKETS=4294967295 %s -o %t.err.nbuckets
+
----------------
I'd probably put these lines with their respective cases, since they're only used once.


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

https://reviews.llvm.org/D79853





More information about the llvm-commits mailing list