diff options
author | Filipe Cabecinhas <me@filcab.net> | 2015-04-15 08:48:08 +0000 |
---|---|---|
committer | Filipe Cabecinhas <me@filcab.net> | 2015-04-15 08:48:08 +0000 |
commit | 7dc896fccea25fd48d1bf44228ea4848ff8ebcfa (patch) | |
tree | bc21e55ba804f5c4bca08c589fda48bbdd05aa33 /llvm/test/Bitcode | |
parent | c640ff63e236d48d90a29f548799ea8342a7aa04 (diff) | |
download | bcm5719-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.bc | bin | 0 -> 612 bytes | |||
-rw-r--r-- | llvm/test/Bitcode/invalid.test | 5 |
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 Binary files differnew file mode 100644 index 00000000000..35d00ba154b --- /dev/null +++ b/llvm/test/Bitcode/Inputs/invalid-VBR-too-big.bc 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 |