Changeset 169758 in webkit


Ignore:
Timestamp:
Jun 10, 2014, 1:29:29 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

Assertion failure at JSC::Structure::checkOffsetConsistency() const + 234.
<https://webkit.org/b/133356>

Reviewed by Mark Hahnenberg.

Source/JavaScriptCore:
The root cause of this issue is that a nonPropertyTransition can transition
a pinned dictionary structure to an unpinned dictionary structure. The new
structure will get a copy of the property table from the original structure.
However, when a GC occurs, the property table in the new structure will be
cleared because it is unpinned. This leads to complications in subsequent
derivative structures when flattening occurs, which eventually leads to the
assertion failure in this bug.

The fix is to ensure that the new dictionary structure generated by the
nonPropertyTransition will have a copy of its predecessor's property table
and is pinned.

  • runtime/Structure.cpp:

(JSC::Structure::nonPropertyTransition):

LayoutTests:

  • TestExpectations:
  • Undoing expectation for js/primitive-property-access-edge-cases.html now that the bug is fixed.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r169756 r169758  
     12014-06-10  Mark Lam  <mark.lam@apple.com>
     2
     3        Assertion failure at JSC::Structure::checkOffsetConsistency() const + 234.
     4        <https://webkit.org/b/133356>
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        * TestExpectations:
     9        - Undoing expectation for js/primitive-property-access-edge-cases.html now
     10          that the bug is fixed.
     11
    1122014-06-10  Alexey Proskuryakov  <ap@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r169671 r169758  
    128128webkit.org/b/132791 svg/as-object/sizing/svg-in-object-placeholder-height-auto.html [ Skip ]
    129129
    130 webkit.org/b/133356 js/primitive-property-access-edge-cases.html [ Pass Crash ]
    131 
    132130webkit.org/b/133057 fast/table/border-collapsing/collapsed-borders-adjoining-sections.html [ ImageOnlyFailure ]
  • trunk/Source/JavaScriptCore/ChangeLog

    r169751 r169758  
     12014-06-10  Mark Lam  <mark.lam@apple.com>
     2
     3        Assertion failure at JSC::Structure::checkOffsetConsistency() const + 234.
     4        <https://webkit.org/b/133356>
     5
     6        Reviewed by Mark Hahnenberg.
     7
     8        The root cause of this issue is that a nonPropertyTransition can transition
     9        a pinned dictionary structure to an unpinned dictionary structure.  The new
     10        structure will get a copy of the property table from the original structure.
     11        However, when a GC occurs, the property table in the new structure will be
     12        cleared because it is unpinned.  This leads to complications in subsequent
     13        derivative structures when flattening occurs, which eventually leads to the
     14        assertion failure in this bug.
     15
     16        The fix is to ensure that the new dictionary structure generated by the
     17        nonPropertyTransition will have a copy of its predecessor's property table
     18        and is pinned.
     19
     20        * runtime/Structure.cpp:
     21        (JSC::Structure::nonPropertyTransition):
     22
    1232014-06-10  Michael Saboff  <msaboff@apple.com>
    224
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r169703 r169758  
    655655    }
    656656   
    657     if (Structure* existingTransition = structure->m_transitionTable.get(0, attributes)) {
     657    Structure* existingTransition;
     658    if (!structure->isDictionary() && (existingTransition = structure->m_transitionTable.get(0, attributes))) {
    658659        ASSERT(existingTransition->m_attributesInPrevious == attributes);
    659660        ASSERT(existingTransition->indexingTypeIncludingHistory() == indexingType);
     
    668669    checkOffset(transition->m_offset, transition->inlineCapacity());
    669670   
    670     {
     671    if (structure->isDictionary())
     672        transition->pin();
     673    else {
    671674        ConcurrentJITLocker locker(structure->m_lock);
    672675        structure->m_transitionTable.add(vm, transition);
Note: See TracChangeset for help on using the changeset viewer.