summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2018-07-26 20:05:31 +0000
committerStephen Hines <srhines@google.com>2018-07-26 20:05:31 +0000
commite6e75bf84c94e03313594c1b5faf2b8065969c39 (patch)
treef5e01740d9cfce74e014d80b868aef5f6c933515 /llvm/test
parentd742d645a1fc6630e462c5702c4429368cc41077 (diff)
downloadbcm5719-llvm-e6e75bf84c94e03313594c1b5faf2b8065969c39.tar.gz
bcm5719-llvm-e6e75bf84c94e03313594c1b5faf2b8065969c39.zip
Handle the lack of a symbol table correctly.
Summary: These two cases will trigger a dereference on a nullptr, since the SymbolTable can be nonexistent for a given library, in addition to just being empty. Reviewers: alexshap Reviewed By: alexshap Subscribers: meikeb, kongyi, chh, jakehehrlich, llvm-commits, pirama Differential Revision: https://reviews.llvm.org/D49534 llvm-svn: 338062
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-objcopy/strip-all.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/strip-all.test b/llvm/test/tools/llvm-objcopy/strip-all.test
index 71e024de072..bc01835a4cb 100644
--- a/llvm/test/tools/llvm-objcopy/strip-all.test
+++ b/llvm/test/tools/llvm-objcopy/strip-all.test
@@ -35,6 +35,13 @@
# RUN: llvm-strip --strip-all %t8
# RUN: cmp %t2 %t8
+# Verify that a non-existent symbol table (after first call to llvm-strip)
+# can be handled correctly.
+# RUN: cp %t %t9
+# RUN: llvm-strip --strip-all -keep=unavailable_symbol %t9
+# RUN: llvm-strip --strip-all -keep=unavailable_symbol %t9
+# RUN: cmp %t2 %t9
+
!ELF
FileHeader:
Class: ELFCLASS64
OpenPOWER on IntegriCloud