summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-06-04 23:40:23 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-06-04 23:40:23 +0000
commit24558d55200186d4ca9edbc9538941df0ba735eb (patch)
tree91056d45c03b0f7ffdc7232a1d0aa22e704e84a8 /llvm/test
parent8230e5ee51ed2a37d1339fa7c608f7ba5c5ed5c7 (diff)
downloadbcm5719-llvm-24558d55200186d4ca9edbc9538941df0ba735eb.tar.gz
bcm5719-llvm-24558d55200186d4ca9edbc9538941df0ba735eb.zip
[Object, ELF] Fix segmentation fault in ELFFile::getSectionName().
Don't do a null dereference if .shstrtab section is missing. llvm-svn: 239124
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/Inputs/invalid.elf.no-shstrtabbin0 -> 52 bytes
-rw-r--r--llvm/test/DebugInfo/dwarfdump-invalid.test3
2 files changed, 3 insertions, 0 deletions
diff --git a/llvm/test/DebugInfo/Inputs/invalid.elf.no-shstrtab b/llvm/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
new file mode 100644
index 00000000000..e5996951fb1
--- /dev/null
+++ b/llvm/test/DebugInfo/Inputs/invalid.elf.no-shstrtab
Binary files differ
diff --git a/llvm/test/DebugInfo/dwarfdump-invalid.test b/llvm/test/DebugInfo/dwarfdump-invalid.test
index da5b23e30ce..4236d4f85e4 100644
--- a/llvm/test/DebugInfo/dwarfdump-invalid.test
+++ b/llvm/test/DebugInfo/dwarfdump-invalid.test
@@ -4,3 +4,6 @@ RUN: llvm-dwarfdump %p/Inputs/invalid.elf 2>&1 | FileCheck %s --check-prefix=INV
RUN: llvm-dwarfdump %p/Inputs/invalid.elf.2 2>&1 | FileCheck %s --check-prefix=INVALID-ELF
RUN: llvm-dwarfdump %p/Inputs/invalid.elf.3 2>&1 | FileCheck %s --check-prefix=INVALID-ELF
INVALID-ELF: Invalid data was encountered while parsing the file
+
+RUN: llvm-dwarfdump %p/Inputs/invalid.elf.no-shstrtab 2>&1 | FileCheck %s --check-prefix=EMPTY
+EMPTY: .debug_info contents:
OpenPOWER on IntegriCloud