summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode/invalid.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-10-31 04:20:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-10-31 04:20:23 +0000
commit26b43cac184d7311bd8552029e13f756fdc7c253 (patch)
tree3ea2647d487ed5dcee81fe4b80707cf771ef994a /llvm/test/Bitcode/invalid.ll
parent8fb73c8778287d5f44a783e7ca14fc1ea2e1a2a0 (diff)
downloadbcm5719-llvm-26b43cac184d7311bd8552029e13f756fdc7c253.tar.gz
bcm5719-llvm-26b43cac184d7311bd8552029e13f756fdc7c253.zip
Fix a use after free on invalid input.
llvm-svn: 193737
Diffstat (limited to 'llvm/test/Bitcode/invalid.ll')
-rw-r--r--llvm/test/Bitcode/invalid.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/invalid.ll b/llvm/test/Bitcode/invalid.ll
new file mode 100644
index 00000000000..49189bf8c06
--- /dev/null
+++ b/llvm/test/Bitcode/invalid.ll
@@ -0,0 +1,7 @@
+; RUN: not llvm-dis < %s.bc 2>&1 | FileCheck %s
+
+; CHECK: llvm-dis: Unknown attribute kind
+
+; invalid.ll.bc has an invalid attribute number.
+; The test checks that LLVM reports the error and doesn't access freed memory
+; in doing so.
OpenPOWER on IntegriCloud