Ignore:
Timestamp:
Jun 6, 2012, 5:23:36 PM (13 years ago)
Author:
[email protected]
Message:

DFG arguments access slow path should not crash if the arguments haven't been created
https://bugs.webkit.org/show_bug.cgi?id=88471

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

  • dfg/DFGCCallHelpers.h:

(JSC::DFG::CCallHelpers::setupArgumentsWithExecState):
(CCallHelpers):

  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

LayoutTests:

  • fast/js/dfg-arguments-out-of-bounds-expected.txt: Added.
  • fast/js/dfg-arguments-out-of-bounds.html: Added.
  • fast/js/dfg-inline-arguments-out-of-bounds-expected.txt: Added.
  • fast/js/dfg-inline-arguments-out-of-bounds.html: Added.
  • fast/js/script-tests/dfg-arguments-out-of-bounds.js: Added.

(foo.bar):
(foo):

  • fast/js/script-tests/dfg-inline-arguments-out-of-bounds.js: Added.

(foo):
(bar):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGCCallHelpers.h

    r118240 r119647  
    217217    }
    218218
     219    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3)
     220    {
     221        resetCallArguments();
     222        addCallArgument(GPRInfo::callFrameRegister);
     223        addCallArgument(arg1);
     224        addCallArgument(arg2);
     225        addCallArgument(arg3);
     226    }
     227
    219228    ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImmPtr arg4)
    220229    {
     
    555564    }
    556565
     566    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImmPtr arg2, GPRReg arg3)
     567    {
     568        move(arg3, GPRInfo::argumentGPR3);
     569        move(arg1, GPRInfo::argumentGPR1);
     570        move(arg2, GPRInfo::argumentGPR2);
     571        move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0);
     572    }
     573
    557574    ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, TrustedImm32 arg3)
    558575    {
Note: See TracChangeset for help on using the changeset viewer.