Verify sizes when trying to read a BitcodeAbbrevOp
Summary: Make sure the abbrev operands are valid and that we can read/skip them afterwards. Bug found with AFL fuzz. Reviewers: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9030 llvm-svn: 235595
This commit is contained in:
BIN
llvm/test/Bitcode/Inputs/invalid-abbrev-fixed-size-too-big.bc
Normal file
BIN
llvm/test/Bitcode/Inputs/invalid-abbrev-fixed-size-too-big.bc
Normal file
Binary file not shown.
BIN
llvm/test/Bitcode/Inputs/invalid-abbrev-vbr-size-too-big.bc
Normal file
BIN
llvm/test/Bitcode/Inputs/invalid-abbrev-vbr-size-too-big.bc
Normal file
Binary file not shown.
@@ -66,3 +66,10 @@ RUN: not llvm-dis -disable-output %p/Inputs/invalid-fp-shift.bc 2>&1 | \
|
||||
RUN: FileCheck --check-prefix=FP-SHIFT %s
|
||||
|
||||
FP-SHIFT: Invalid record
|
||||
|
||||
RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-vbr-size-too-big.bc 2>&1 | \
|
||||
RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
|
||||
RUN: not llvm-dis -disable-output %p/Inputs/invalid-abbrev-fixed-size-too-big.bc 2>&1 | \
|
||||
RUN: FileCheck --check-prefix=HUGE-ABBREV-OP %s
|
||||
|
||||
HUGE-ABBREV-OP: Fixed or VBR abbrev record with size > MaxChunkData
|
||||
|
||||
Reference in New Issue
Block a user