This is an archive of the discontinued LLVM Phabricator instance.

Error out of ParseBitcodeInto(Module*) if we haven't read a Module
ClosedPublic

Authored by filcab on Apr 14 2015, 6:00 AM.

Details

Summary

Without this check the following case failed:

Skip a SubBlock which is not a MODULE_BLOCK_ID nor a BLOCKINFO_BLOCK_ID
Got to end of file

TheModule would still be == nullptr, and we would subsequentially fail
when materializing the Module (assert at the start of
BitcodeReader::MaterializeModule).

Bug found with AFL.

Diff Detail

Event Timeline

filcab updated this revision to Diff 23729.Apr 14 2015, 6:00 AM
filcab retitled this revision from to Error out of ParseBitcodeInto(Module*) if we haven't read a Module.
filcab updated this object.
filcab edited the test plan for this revision. (Show Details)
filcab added reviewers: dexonsmith, rafael.
filcab added a subscriber: Unknown Object (MLST).
This revision was automatically updated to reflect the committed changes.