Ignore:
Timestamp:
Oct 2, 2015, 2:16:20 PM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling back in r190450
https://bugs.webkit.org/show_bug.cgi?id=149727

The cause of the crash was a CodeBlock, after surviving a call to
deleteAllCode by virtue of being in the remembered set, trying to mark
its inlined CodeBlocks via pointers from its inlined executables.
Since deleteAllCode clears those pointers, the CodeBlock would ASSERT.
(Any other choice to retain a CodeBlock after deleteAllCode -- for
example, conservative marking -- could trigger the same bug.)

The fix is for InlineCallFrame to point directly to its inlined CodeBlock
instead of pointing indirectly via an executable. This guarantees that
CodeBlocks are GC safe regardless of whether we've called deleteAllCode.

Restored changesets:

"CodeBlock should be a GC object"
https://bugs.webkit.org/show_bug.cgi?id=149727
http://trac.webkit.org/changeset/190450

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGJITCode.h

    r190453 r190522  
    2929#if ENABLE(DFG_JIT)
    3030
     31#include "CodeBlock.h"
    3132#include "CompilationResult.h"
    3233#include "DFGCommonData.h"
     
    115116   
    116117    void shrinkToFit();
     118
     119#if ENABLE(FTL_JIT)
     120    CodeBlock* osrEntryBlock() { return m_osrEntryBlock.get(); }
     121    void setOSREntryBlock(VM& vm, const JSCell* owner, CodeBlock* osrEntryBlock) { m_osrEntryBlock.set(vm, owner, osrEntryBlock); }
     122    void clearOSREntryBlock() { m_osrEntryBlock.clear(); }
     123#endif
    117124   
    118125private:
     
    129136    uint8_t nestedTriggerIsSet { 0 };
    130137    UpperTierExecutionCounter tierUpCounter;
    131     RefPtr<CodeBlock> osrEntryBlock;
     138    WriteBarrier<CodeBlock> m_osrEntryBlock;
    132139    unsigned osrEntryRetry;
    133140    bool abandonOSREntry;
Note: See TracChangeset for help on using the changeset viewer.