Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r247426 - Concurrent GC should not rely on current phase to det…
…ermine if it's safe to steal conn https://bugs.webkit.org/show_bug.cgi?id=199786 <rdar://problem/52505197> Reviewed by Saam Barati. In r246507, we fixed a race condition in the concurrent GC where the mutator might steal the conn from the collector thread while it transitions from the End phase to NotRunning. However, that fix was not sufficient. In the case that the mutator steals the conn, and the execution interleaves long enough for the mutator to progress to a different collection phase, the collector will resume in a phase other than NotRunning, and hence the check added to NotRunning will not suffice. To fix that, we add a new variable to track whether the collector thread is running (m_collectorThreadIsRunning) and use it to determine whether it's safe to steal the conn, rather than relying on m_currentPhase. * heap/Heap.cpp: (JSC::Heap::runNotRunningPhase): (JSC::Heap::requestCollection): * heap/Heap.h:
- Loading branch information
1 parent
7b1f14b
commit d361157
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters