Changeset 248271 in webkit


Ignore:
Timestamp:
Aug 5, 2019 1:02:51 PM (5 years ago)
Author:
msaboff@apple.com
Message:

JSC: assertion failure in SpeculativeJIT::compileGetByValOnIntTypedArray
https://bugs.webkit.org/show_bug.cgi?id=199997

Reviewed by Saam Barati.

JSTests:

New test.

  • stress/typedarray-no-alreadyChecked-assert.js: Added.

(checkIntArray):
(checkFloatArray):

Source/JavaScriptCore:

No need to ASSERT(node->arrayMode().alreadyChecked(...)) in SpeculativeJIT::compileGetByValOnIntTypedArray()
and compileGetByValOnFloatTypedArray() as the abstract interpreter is conservative and can insert a
CheckStructureOrEmpty which will fail the ASSERT as it checks for the SpecType of the array
and not for SpecEmpty. If we added a check for the SpecEmpty in the ASSERT, there are cases where
it won't be set.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r248187 r248271  
     12019-08-05  Michael Saboff  <msaboff@apple.com>
     2
     3        JSC: assertion failure in SpeculativeJIT::compileGetByValOnIntTypedArray
     4        https://bugs.webkit.org/show_bug.cgi?id=199997
     5
     6        Reviewed by Saam Barati.
     7
     8        New test.
     9
     10        * stress/typedarray-no-alreadyChecked-assert.js: Added.
     11        (checkIntArray):
     12        (checkFloatArray):
     13
    1142019-08-02  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r248201 r248271  
     12019-08-05  Michael Saboff  <msaboff@apple.com>
     2
     3        JSC: assertion failure in SpeculativeJIT::compileGetByValOnIntTypedArray
     4        https://bugs.webkit.org/show_bug.cgi?id=199997
     5
     6        Reviewed by Saam Barati.
     7
     8        No need to ASSERT(node->arrayMode().alreadyChecked(...)) in SpeculativeJIT::compileGetByValOnIntTypedArray()
     9        and compileGetByValOnFloatTypedArray() as the abstract interpreter is conservative and can insert a
     10        CheckStructureOrEmpty which will fail the ASSERT as it checks for the SpecType of the array
     11        and not for SpecEmpty.  If we added a check for the SpecEmpty in the ASSERT, there are cases where
     12        it won't be set.
     13
     14        * dfg/DFGSpeculativeJIT.cpp:
     15        (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
     16        (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
     17
    1182019-08-03  Devin Rousso  <drousso@apple.com>
    219
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r248192 r248271  
    29642964    GPRReg resultReg = result.gpr();
    29652965
    2966     ASSERT(node->arrayMode().alreadyChecked(m_jit.graph(), node, m_state.forNode(m_graph.varArgChild(node, 0))));
    2967 
    29682966    emitTypedArrayBoundsCheck(node, baseReg, propertyReg);
    29692967    loadFromIntTypedArray(storageReg, propertyReg, resultReg, type);
     
    31933191    GPRReg propertyReg = property.gpr();
    31943192    GPRReg storageReg = storage.gpr();
    3195 
    3196     ASSERT(node->arrayMode().alreadyChecked(m_jit.graph(), node, m_state.forNode(m_graph.varArgChild(node, 0))));
    31973193
    31983194    FPRTemporary result(this);
Note: See TracChangeset for help on using the changeset viewer.