summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2015-04-15 08:48:08 +0000
committerFilipe Cabecinhas <me@filcab.net>2015-04-15 08:48:08 +0000
commit7dc896fccea25fd48d1bf44228ea4848ff8ebcfa (patch)
treebc21e55ba804f5c4bca08c589fda48bbdd05aa33 /llvm/test/Bitcode
parentc640ff63e236d48d90a29f548799ea8342a7aa04 (diff)
downloadbcm5719-llvm-7dc896fccea25fd48d1bf44228ea4848ff8ebcfa.tar.gz
bcm5719-llvm-7dc896fccea25fd48d1bf44228ea4848ff8ebcfa.zip
Verify sizes when trying to read a VBR
Also added an assert to ReadVBR64. llvm-svn: 234984
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/Inputs/invalid-VBR-too-big.bcbin0 -> 612 bytes
-rw-r--r--llvm/test/Bitcode/invalid.test5
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/Inputs/invalid-VBR-too-big.bc b/llvm/test/Bitcode/Inputs/invalid-VBR-too-big.bc
new file mode 100644
index 00000000000..35d00ba154b
--- /dev/null
+++ b/llvm/test/Bitcode/Inputs/invalid-VBR-too-big.bc
Binary files differ
diff --git a/llvm/test/Bitcode/invalid.test b/llvm/test/Bitcode/invalid.test
index 9cab227ab19..59543d2ae79 100644
--- a/llvm/test/Bitcode/invalid.test
+++ b/llvm/test/Bitcode/invalid.test
@@ -55,3 +55,8 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-no-proper-module.bc 2>&1 | \
RUN: FileCheck --check-prefix=NO-MODULE %s
NO-MODULE: Malformed IR file
+
+RUN: not llvm-dis -disable-output %p/Inputs/invalid-VBR-too-big.bc 2>&1 | \
+RUN: FileCheck --check-prefix=HUGE-VBR %s
+
+HUGE-VBR: Invalid record
OpenPOWER on IntegriCloud