diff options
| author | George Rimar <grimar@accesssoftek.com> | 2016-10-10 10:51:38 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2016-10-10 10:51:38 +0000 |
| commit | e4dce5ce3eccc0e9edc67a7aef46e5aebc7dda03 (patch) | |
| tree | ba002bb78159f623ec4be7313f56d5ab31872033 /llvm/test/Object/Inputs | |
| parent | 2e2c24d2b253902908b65c7ae5245a1a666b18b2 (diff) | |
| download | bcm5719-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-64 | bin | 0 -> 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 Binary files differnew file mode 100644 index 00000000000..c0653d1d1b3 --- /dev/null +++ b/llvm/test/Object/Inputs/invalid-sections-address-alignment.x86-64 |

