diff options
| author | Filipe Cabecinhas <me@filcab.net> | 2015-05-27 01:05:40 +0000 |
|---|---|---|
| committer | Filipe Cabecinhas <me@filcab.net> | 2015-05-27 01:05:40 +0000 |
| commit | 6a92a3fe3423f48b71a1a138a8553a067246361d (patch) | |
| tree | c7c35d74f32bac26c9e68dee46b89a9329537841 /llvm/lib | |
| parent | ad60a9a5160c8ab5db8c3aa8292cde5cc5821be3 (diff) | |
| download | bcm5719-llvm-6a92a3fe3423f48b71a1a138a8553a067246361d.tar.gz bcm5719-llvm-6a92a3fe3423f48b71a1a138a8553a067246361d.zip | |
[BitcodeReader] Change assert to report_fatal_error
It can be triggered by user input.
Bug found with AFL fuzz.
llvm-svn: 238272
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 95cf51f1419..f6d5ccc1a59 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -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); } |

