This is an archive of the discontinued LLVM Phabricator instance.

[BitcodeReader] Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic.
ClosedPublic

Authored by philip.pfaffe on Jul 1 2015, 11:12 AM.

Details

Reviewers
filcab
rafael
Summary

When trying to upgrade @llvm.x86.sse2.psrl.dq while parsing a module, BitcodeReader adds the function to its worklist twice, resulting in a crash when accessing it the second time.

This patch replaces the worklist vector by a map.

Diff Detail

Event Timeline

philip.pfaffe retitled this revision from to [BitcodeReader] Fix for PR23310: llvm-dis crashes when trying to upgrade an intrinsic..
philip.pfaffe updated this object.
philip.pfaffe edited the test plan for this revision. (Show Details)
philip.pfaffe added reviewers: rafael, filcab.
philip.pfaffe set the repository for this revision to rL LLVM.
philip.pfaffe added a subscriber: Unknown Object (MLST).
filcab added inline comments.Jul 1 2015, 11:57 AM
lib/Bitcode/Reader/BitcodeReader.cpp
4464

Please do the range-loop patch as a separate one (before the switch from vector to DenseMap).

4534

Do the range-for change separately.

philip.pfaffe removed rL LLVM as the repository for this revision.

Moved range-loops into seperate patch.

rafael accepted this revision.Jul 2 2015, 5:36 AM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 2 2015, 5:36 AM
philip.pfaffe edited edge metadata.

Added git diff --binary