summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/Inputs
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-10-10 10:51:38 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-10-10 10:51:38 +0000
commite4dce5ce3eccc0e9edc67a7aef46e5aebc7dda03 (patch)
treeba002bb78159f623ec4be7313f56d5ab31872033 /llvm/test/Object/Inputs
parent2e2c24d2b253902908b65c7ae5245a1a666b18b2 (diff)
downloadbcm5719-llvm-e4dce5ce3eccc0e9edc67a7aef46e5aebc7dda03.tar.gz
bcm5719-llvm-e4dce5ce3eccc0e9edc67a7aef46e5aebc7dda03.zip
[Object/ELF] - Do not crash on invalid Header->e_shoff value.
sections_begin() may return unalignment pointer when Header->e_shoff isinvalid. That may result in a crash in clients, for example we have one in LLD: assert((PtrWord & ~PointerBitMask) == 0 && "Pointer is not sufficiently aligned"); fails when trying to push_back Elf_Shdr* (unaligned) into TinyPtrVector. Patch forces check for alignment of Header->e_shoff. Differential revision: https://reviews.llvm.org/D25368 llvm-svn: 283740
Diffstat (limited to 'llvm/test/Object/Inputs')
-rw-r--r--llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64bin0 -> 473 bytes
1 files changed, 0 insertions, 0 deletions
diff --git a/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 b/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64
new file mode 100644
index 00000000000..c0653d1d1b3
--- /dev/null
+++ b/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64
Binary files differ
OpenPOWER on IntegriCloud