This fixes a problem in LICM where copying the ColorVector in SafetyInfo::BlockColors from one block to another can cause a crash if creating the new entry forces the map to be re-allocated. I have seen this problem occur in a real-world situation, but I don't have a small reproducer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Sigh.
(a quick scan of things named Map in LLVM doesn't find any other obvious cases of this).
I wonder if we shouldn't have a debug/expensive checks mode where it moves all the memory on find and construct to make all these situations fail obviously and instantly so it could be found by bots.
Comment Actions
There used to be a case exactly like this in WinEHPrepare::replaceUseWithLoad(), which is how I knew how to fix this when I saw it crash. The debug mode is a good idea. Could that trigger off of one of the sanitizers somehow?