summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/invalid.test
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-10-31 15:33:00 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-10-31 15:33:00 +0000
commitf01f65ea593bf1bbdcbeb425e1053ac3bbd9644d (patch)
treea01481d59c11b0ff659104343b0fc8935a1f1513 /llvm/test/Object/invalid.test
parent2460bada567e0bb9213640d53f417dfd4e23a954 (diff)
downloadbcm5719-llvm-f01f65ea593bf1bbdcbeb425e1053ac3bbd9644d.tar.gz
bcm5719-llvm-f01f65ea593bf1bbdcbeb425e1053ac3bbd9644d.zip
Recommit r285285 - [Object/ELF] - Fixed behavior when SectionHeaderTable->sh_size is too large.
with fix: edited invalid-section-index2.elf input to pass the new check and fail on the same place it was intended to fail. Original commit message: Elf.h already has code checking that section table does not go past end of file. Problem is that this check may not work on values greater than UINT64_MAX / Header->e_shentsize because of calculation overflow. Parch fixes the issue. Differential revision: https://reviews.llvm.org/D25432 llvm-svn: 285586
Diffstat (limited to 'llvm/test/Object/invalid.test')
-rw-r--r--llvm/test/Object/invalid.test3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test
index a0016fef9d5..dd431aa3a55 100644
--- a/llvm/test/Object/invalid.test
+++ b/llvm/test/Object/invalid.test
@@ -76,3 +76,6 @@ INVALID-SEC-ADDRESS-ALIGNMENT: Invalid data was encountered while parsing the fi
RUN: not llvm-readobj -t %p/Inputs/invalid-section-size2.elf 2>&1 | \
RUN: FileCheck --check-prefix=INVALID-SECTION-SIZE2 %s
INVALID-SECTION-SIZE2: Invalid data was encountered while parsing the file.
+
+RUN: not llvm-readobj -t %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s
+INVALID-SECTION-NUM: Invalid data was encountered while parsing the file.
OpenPOWER on IntegriCloud