You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Synth] Fix race condition and memory corruption in longest path analysis caching (#9098)
This commit addresses a race condition and memory corruption issue in the
LongestPathAnalysis where concurrent access to cached results could lead to
iterator invalidation and memory corruption. The issue occurred when the
cachedResults DenseMap was modified during iteration, causing existing
iterators and references to become invalid and point to corrupted memory.
The fix changes the cachedResults map to store unique_ptr<SmallVector<OpenPath>>
instead of SmallVector<OpenPath> directly. This ensures that the underlying
SmallVector objects remain at stable memory locations even when the DenseMap
is rehashed or modified, preventing iterator invalidation and memory corruption.
0 commit comments