Verify sizes when trying to read a VBR

Also added an assert to ReadVBR64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234984 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Filipe Cabecinhas
2015-04-15 08:48:08 +00:00
parent dc374b5eb4
commit 4c0055402f
4 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@@ -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