I ran into a case where the spec2006/483 test was crashing during compilation because the WinEHPrepare pass was inserting a new element into a DenseMap while holding a reference to an existing element and the insertion caused the map to be reallocated. Near as I can tell, what WinEHPrepare was doing would have been legal with an std::map but isn't guaranteed to work with DenseMap.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
lgtm
lib/CodeGen/WinEHPrepare.cpp | ||
---|---|---|
1205–1207 ↗ | (On Diff #81167) | This can be shortened to something like "Insert NewBlock before looking up PHIBlock to avoid dangling references.". Anyone familiar with DenseMap should know how the iterator invalidation guarantees differ from std::map. |