llvm.org GIT mirror llvm / 4f3a95e
Revert [BitcodeReader] Validate OpNum, before accessing Record array. This reverts r365750 (git commit 8b222ecf2769ee133691f208f6166ce118c4a164) llvm-dis runs out of memory while opening invalid-fcmp-opnum.bc on llvm-hexagon-elf, probably because the bitcode file contains other suspicious values. http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/21949 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365757 91177308-0d34-0410-b5e6-96231b3b80d8 Florian Hahn a month ago
3 changed file(s) with 0 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
41644164 popValue(Record, OpNum, NextValueNo, LHS->getType(), RHS))
41654165 return error("Invalid record");
41664166
4167 if (OpNum >= Record.size())
4168 return error(
4169 "Invalid record: operand number exceeded available operands");
4170
41714167 unsigned PredVal = Record[OpNum];
41724168 bool IsFP = LHS->getType()->isFPOrFPVectorTy();
41734169 FastMathFlags FMF;
test/Bitcode/Inputs/invalid-fcmp-opnum.bc less more
Binary diff not shown
234234 RUN: FileCheck --check-prefix=NONPOINTER-ATOMICRMW %s
235235
236236 NONPOINTER-ATOMICRMW: Invalid record
237
238 RUN: not llvm-dis -disable-output %p/Inputs/invalid-fcmp-opnum.bc 2>&1 | \
239 RUN: FileCheck --check-prefix=INVALID-FCMP-OPNUM %s
240
241 INVALID-FCMP-OPNUM: Invalid record: operand number exceeded available operands