summaryrefslogtreecommitdiff
path: root/test/Bitcode
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
commitcc8c673e61c05dcfd4aaf34f0d1a1454991bc795 (patch)
tree0603d47401e1dc1f124da9255aeb3105b4355c93 /test/Bitcode
parent8f4397799f9eebdc149754c539619ccbed578b90 (diff)
downloadllvm-cc8c673e61c05dcfd4aaf34f0d1a1454991bc795.tar.gz
llvm-cc8c673e61c05dcfd4aaf34f0d1a1454991bc795.tar.bz2
llvm-cc8c673e61c05dcfd4aaf34f0d1a1454991bc795.tar.xz
Fix a use after free on invalid input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Bitcode')
-rw-r--r--test/Bitcode/invalid.ll7
-rw-r--r--test/Bitcode/invalid.ll.bcbin0 -> 332 bytes
2 files changed, 7 insertions, 0 deletions
diff --git a/test/Bitcode/invalid.ll b/test/Bitcode/invalid.ll
new file mode 100644
index 0000000000..49189bf8c0
--- /dev/null
+++ b/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.
diff --git a/test/Bitcode/invalid.ll.bc b/test/Bitcode/invalid.ll.bc
new file mode 100644
index 0000000000..b8b1c47b6a
--- /dev/null
+++ b/test/Bitcode/invalid.ll.bc
Binary files differ