Changeset 164448 in webkit


Ignore:
Timestamp:
Feb 20, 2014, 2:55:11 PM (11 years ago)
Author:
mhahnenberg@apple.com
Message:

CopiedBlock::pin can call into fastFree while forbidden
https://bugs.webkit.org/show_bug.cgi?id=128654

Reviewed by Oliver Hunt.

A FullCollection that skips copying doesn't clear the CopyWorkList of the all the surviving
CopiedBlocks because we currently only call didSurviveGC() at the beginning of FullCollections.

EdenCollections always do copying, therefore they always clear all CopyWorkLists.

The fix is to call didSurviveGC() for all surviving CopiedBlocks at the end of FullCollections
as well at the beginning.

  • heap/CopiedBlock.h:

(JSC::CopiedBlock::didSurviveGC):

  • heap/CopiedSpace.cpp:

(JSC::CopiedSpace::doneCopying):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r164447 r164448  
     12014-02-20  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        CopiedBlock::pin can call into fastFree while forbidden
     4        https://bugs.webkit.org/show_bug.cgi?id=128654
     5
     6        Reviewed by Oliver Hunt.
     7
     8        A FullCollection that skips copying doesn't clear the CopyWorkList of the all the surviving
     9        CopiedBlocks because we currently only call didSurviveGC() at the beginning of FullCollections.
     10
     11        EdenCollections always do copying, therefore they always clear all CopyWorkLists.
     12
     13        The fix is to call didSurviveGC() for all surviving CopiedBlocks at the end of FullCollections
     14        as well at the beginning.
     15
     16        * heap/CopiedBlock.h:
     17        (JSC::CopiedBlock::didSurviveGC):
     18        * heap/CopiedSpace.cpp:
     19        (JSC::CopiedSpace::doneCopying):
     20
    1212014-02-20  Mark Hahnenberg  <mhahnenberg@apple.com>
    222
  • trunk/Source/JavaScriptCore/heap/CopiedBlock.h

    r162017 r164448  
    148148{
    149149    checkConsistency();
     150    ASSERT(isOld());
    150151    m_liveBytes = 0;
    151152#ifndef NDEBUG
  • trunk/Source/JavaScriptCore/heap/CopiedSpace.cpp

    r163844 r164448  
    254254        ASSERT(m_blockSet.contains(block));
    255255        blockFilter->add(reinterpret_cast<Bits>(block));
     256        block->didSurviveGC();
    256257        toSpace->push(block);
    257258    }
Note: See TracChangeset for help on using the changeset viewer.