]> granicus.if.org Git - llvm/commit
[llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocatio...
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 25 Sep 2019 10:14:50 +0000 (10:14 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 25 Sep 2019 10:14:50 +0000 (10:14 +0000)
commitbf355ffd89d51cae09bf5dbd1abe736afe4aee58
tree4b291e0436d56cba62a8b08abe8f4b7460f5b336
parent9edd4decf58a0eba1b0ff15cc2ea7823a43a587f
[llvm-readobj] - Don't crash when dumping .stack_sizes and unable to find a relocation resolver.

The crash might happen when we have either a broken or unsupported object
and trying to resolve relocations when dumping the .stack_sizes section.

For the test case I used a 32-bits ELF header and a 64-bit relocation.
In this case a null pointer is returned by the code instead of the relocation
resolver function and then we crash.

Differential revision: https://reviews.llvm.org/D67962

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372838 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-readobj/stack-sizes.test
tools/llvm-readobj/ELFDumper.cpp