Changeset 214509 in webkit


Ignore:
Timestamp:
Mar 28, 2017 5:43:09 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

The Mutator should not be able to steal the conn if the Collector hasn't reached the NotRunning phase yet.
https://bugs.webkit.org/show_bug.cgi?id=170213
<rdar://problem/30755345>

Reviewed by Filip Pizlo.

The current condition for stealing the conn isn't tight enough. Restricting the
stealing to when m_currentPhase == NotRunning ensures that the Collector is
really done running.

No test because this issue only manifests with a race condition that is difficult
to reproduce on demand.

  • heap/Heap.cpp:

(JSC::Heap::requestCollection):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r214504 r214509  
     12017-03-28  Mark Lam  <mark.lam@apple.com>
     2
     3        The Mutator should not be able to steal the conn if the Collector hasn't reached the NotRunning phase yet.
     4        https://bugs.webkit.org/show_bug.cgi?id=170213
     5        <rdar://problem/30755345>
     6
     7        Reviewed by Filip Pizlo.
     8
     9        The current condition for stealing the conn isn't tight enough.  Restricting the
     10        stealing to when m_currentPhase == NotRunning ensures that the Collector is
     11        really done running.
     12
     13        No test because this issue only manifests with a race condition that is difficult
     14        to reproduce on demand.
     15
     16        * heap/Heap.cpp:
     17        (JSC::Heap::requestCollection):
     18
    1192017-03-28  Keith Miller  <keith_miller@apple.com>
    220
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r214393 r214509  
    19621962    // cases.
    19631963    ASSERT(m_lastServedTicket <= m_lastGrantedTicket);
    1964     if (m_lastServedTicket == m_lastGrantedTicket) {
     1964    if ((m_lastServedTicket == m_lastGrantedTicket) && (m_currentPhase == CollectorPhase::NotRunning)) {
    19651965        if (false)
    19661966            dataLog("Taking the conn.\n");
Note: See TracChangeset for help on using the changeset viewer.