[PATCH] D90214: [llvm-readobj/elf] - Fix a crash when dumping a dynamic relocation that refer to a symbol past the EOF.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 02:25:13 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.

There is a possible scenario when we crash when dumping dynamic relocations.
For that we should have no section headers (to take the number of synamic symbols from)
and a dynamic relocation that refers to a symbol with an index that is too large to be in a file.

The patch fixes it.


https://reviews.llvm.org/D90214

Files:
  llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90214.300921.patch
Type: text/x-patch
Size: 5862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201027/c9f8e26c/attachment.bin>


More information about the llvm-commits mailing list