[BitcodeReader] Change assert to report_fatal_error
It can be triggered by user input. Bug found with AFL fuzz. llvm-svn: 238272
This commit is contained in:
@@ -785,7 +785,8 @@ Constant *BitcodeReaderValueList::getConstantFwdRef(unsigned Idx,
|
||||
resize(Idx + 1);
|
||||
|
||||
if (Value *V = ValuePtrs[Idx]) {
|
||||
assert(Ty == V->getType() && "Type mismatch in constant table!");
|
||||
if (Ty != V->getType())
|
||||
report_fatal_error("Type mismatch in constant table!");
|
||||
return cast<Constant>(V);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user