We might have a scenario where a the GbuHashTable variable correctly points
to a place inside the file (we validate this fact early in parseDynamicTable),
but nbuckets/maskwords fields are broken in the way the code tries
to read the data past the EOF. This patch fixes the issue.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM.
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
---|---|---|
2681 | IIRC this is guaranteed by ELFFile<ELFT>::toMappedAddr |
Comment Actions
LGTM, with one suggestion.
llvm/test/tools/llvm-readobj/ELF/gnuhash.test | ||
---|---|---|
323–324 | I'd probably put these lines with their respective cases, since they're only used once. |
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
---|---|---|
2681 | Yes. |
I'd probably put these lines with their respective cases, since they're only used once.