⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 179882 in webkit


Ignore:
Timestamp:
Feb 10, 2015, 1:59:54 PM (12 years ago)
Author:
msaboff@apple.com
Message:

Crash in JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq
https://bugs.webkit.org/show_bug.cgi?id=139398

Reviewed by Filip Pizlo.

Due to CFA analysis, the CompareStrictEq node was determined to be unreachable, but later
was determined to be reachable. When we go to lower to LLVM, the edges for the CompareStrictEq
node are UntypedUse which we can't compile. Fixed this by checking that the IR before
lowering can still be handled by the FTL.

Had to add GetArgument as a node that the FTL can compile as the SSA conversion phase converts
a SetArgument to a GetArgument. Before this change FTL::canCompile() would never see a GetArgument
node. With the check right before lowering, we see this node.

  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::compileInThreadImpl): Added a final FTL::canCompile() check before lowering
to verify that after all the transformations we still have valid IR for the FTL.

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile): Added GetArgument as a node the FTL can compile.

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r179875 r179882  
     12015-02-10  Michael Saboff  <msaboff@apple.com>
     2
     3        Crash in JSC::FTL::LowerDFGToLLVM::compileCompareStrictEq
     4        https://bugs.webkit.org/show_bug.cgi?id=139398
     5
     6        Reviewed by Filip Pizlo.
     7
     8        Due to CFA analysis, the CompareStrictEq node was determined to be unreachable, but later
     9        was determined to be reachable.  When we go to lower to LLVM, the edges for the CompareStrictEq
     10        node are UntypedUse which we can't compile.  Fixed this by checking that the IR before
     11        lowering can still be handled by the FTL.
     12
     13        Had to add GetArgument as a node that the FTL can compile as the SSA conversion phase converts
     14        a SetArgument to a GetArgument.  Before this change FTL::canCompile() would never see a GetArgument
     15        node.  With the check right before lowering, we see this node.
     16
     17        * dfg/DFGPlan.cpp:
     18        (JSC::DFG::Plan::compileInThreadImpl): Added a final FTL::canCompile() check before lowering
     19        to verify that after all the transformations we still have valid IR for the FTL.
     20        * ftl/FTLCapabilities.cpp:
     21        (JSC::FTL::canCompile): Added GetArgument as a node the FTL can compile.
     22
    1232015-02-10  Filip Pizlo  <fpizlo@apple.com>
    224
  • trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp

    r179815 r179882  
    365365        performWatchpointCollection(dfg);
    366366       
     367        if (FTL::canCompile(dfg) == FTL::CannotCompile) {
     368            finalizer = std::make_unique<FailedFinalizer>(*this);
     369            return FailPath;
     370        }
     371
    367372        dumpAndVerifyGraph(dfg, "Graph just before FTL lowering:");
    368373       
     
    380385            return FailPath;
    381386        }
    382            
     387
    383388        FTL::State state(dfg);
    384389        FTL::lowerDFGToLLVM(state);
  • trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp

    r179478 r179882  
    5252    case MovHint:
    5353    case ZombieHint:
     54    case GetArgument:
    5455    case Phantom:
    5556    case HardPhantom:
Note: See TracChangeset for help on using the changeset viewer.