Title: [252247] trunk/Source/_javascript_Core
Revision
252247
Author
[email protected]
Date
2019-11-08 11:37:54 -0800 (Fri, 08 Nov 2019)

Log Message

Remove invalid assertion in DFG's compileNewArray().
https://bugs.webkit.org/show_bug.cgi?id=204002
<rdar://problem/56973531>

Reviewed by Robin Morisset.

The assertion is in an if clause conditional on !globalObject->isHavingABadTime().
The assertion tests the IndexingType of a structure returned by
arrayStructureForIndexingTypeDuringAllocation().  

However, the structures returned by arrayStructureForIndexingTypeDuringAllocation()
may have started transitioning to their SlowPut variant because the mutator will
be imminently firing the HavingABadTime watchpoint, but haven't done so yet.
In a race, the DFG may see the SlowPut variants of the structures before
isHavingABadTime() returns true.  Hence, the assertion is invalid.

Note that the FTL does not have this assertion.

This issue is already tested by stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileNewArray):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (252246 => 252247)


--- trunk/Source/_javascript_Core/ChangeLog	2019-11-08 19:11:14 UTC (rev 252246)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-11-08 19:37:54 UTC (rev 252247)
@@ -1,3 +1,28 @@
+2019-11-08  Mark Lam  <[email protected]>
+
+        Remove invalid assertion in DFG's compileNewArray().
+        https://bugs.webkit.org/show_bug.cgi?id=204002
+        <rdar://problem/56973531>
+
+        Reviewed by Robin Morisset.
+
+        The assertion is in an if clause conditional on !globalObject->isHavingABadTime().
+        The assertion tests the IndexingType of a structure returned by
+        arrayStructureForIndexingTypeDuringAllocation().  
+
+        However, the structures returned by arrayStructureForIndexingTypeDuringAllocation()
+        may have started transitioning to their SlowPut variant because the mutator will
+        be imminently firing the HavingABadTime watchpoint, but haven't done so yet.
+        In a race, the DFG may see the SlowPut variants of the structures before
+        isHavingABadTime() returns true.  Hence, the assertion is invalid.
+
+        Note that the FTL does not have this assertion.
+
+        This issue is already tested by stress/racy-slow-put-cloned-arguments-when-having-a-bad-time.js.
+
+        * dfg/DFGSpeculativeJIT.cpp:
+        (JSC::DFG::SpeculativeJIT::compileNewArray):
+
 2019-11-08  Ross Kirsling  <[email protected]>
 
         [PlayStation][JSC] Unreviewed build fix.

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (252246 => 252247)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2019-11-08 19:11:14 UTC (rev 252246)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp	2019-11-08 19:37:54 UTC (rev 252247)
@@ -7978,12 +7978,6 @@
     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()));
     if (!globalObject->isHavingABadTime() && !hasAnyArrayStorage(node->indexingType())) {
-        ASSERT(
-            hasUndecided(structure->indexingType())
-            || hasInt32(structure->indexingType())
-            || hasDouble(structure->indexingType())
-            || hasContiguous(structure->indexingType()));
-
         unsigned numElements = node->numChildren();
         unsigned vectorLengthHint = node->vectorLengthHint();
         ASSERT(vectorLengthHint >= numElements);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to