Concurrent FTL causes !hasOptimizedReplacement() asserts in cti_optimize
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2013 20:20:23 +0000 (20:20 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Sep 2013 20:20:23 +0000 (20:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120890

Reviewed by Mark Hahnenberg.

Don't install an FTL code block if the DFG code block has already been jettisoned.

* dfg/DFGToFTLDeferredCompilationCallback.cpp:
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155209 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGToFTLDeferredCompilationCallback.cpp

index 751304f57e5c2ad70fe0e328badd83fe5773b094..39dc8b34e9b80d4245a8b74d02b81471cbf43bad 100644 (file)
@@ -1,3 +1,15 @@
+2013-09-06  Filip Pizlo  <fpizlo@apple.com>
+
+        Concurrent FTL causes !hasOptimizedReplacement() asserts in cti_optimize
+        https://bugs.webkit.org/show_bug.cgi?id=120890
+
+        Reviewed by Mark Hahnenberg.
+        
+        Don't install an FTL code block if the DFG code block has already been jettisoned.
+
+        * dfg/DFGToFTLDeferredCompilationCallback.cpp:
+        (JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):
+
 2013-09-06  Filip Pizlo  <fpizlo@apple.com>
 
         REGRESSION(149636, merged in 153145): ToThis conversion doesn't work in the DFG
 2013-09-06  Filip Pizlo  <fpizlo@apple.com>
 
         REGRESSION(149636, merged in 153145): ToThis conversion doesn't work in the DFG
index 1cb32d76a3646f0c8aa28b882cfeb10bd3cd9663..7770fd627ebebfaaff8bb50ff35261576511fb1e 100644 (file)
@@ -70,6 +70,15 @@ void ToFTLDeferredCompilationCallback::compilationDidComplete(
             ") result: ", result, "\n");
     }
     
             ") result: ", result, "\n");
     }
     
+    if (m_dfgCodeBlock->replacement() != m_dfgCodeBlock) {
+        if (Options::verboseOSR()) {
+            dataLog(
+                "Dropping FTL code block ", *codeBlock, " on the floor because the "
+                "DFG code block ", *m_dfgCodeBlock, " was jettisoned.\n");
+        }
+        return;
+    }
+    
     if (result == CompilationSuccessful)
         codeBlock->install();
     
     if (result == CompilationSuccessful)
         codeBlock->install();