Changeset 163274 in webkit


Ignore:
Timestamp:
Feb 2, 2014 4:22:37 PM (10 years ago)
Author:
mark.lam@apple.com
Message:

Repatch code is passing the wrong args to lookupExceptionHandler.
<https://webkit.org/b/128085>

Reviewed by Oliver Hunt.

lookupExceptionHandler() is expecting 2 args: VM*, ExecState*.
The repatch code was only passing an ExecState*. A crash ensues.
This is now fixed.

  • jit/JIT.cpp:

(JSC::JIT::privateCompileExceptionHandlers):

  • jit/Repatch.cpp:

(JSC::generateProtoChainAccessStub):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r163259 r163274  
     12014-02-02  Mark Lam  <mark.lam@apple.com>
     2
     3        Repatch code is passing the wrong args to lookupExceptionHandler.
     4        <https://webkit.org/b/128085>
     5
     6        Reviewed by Oliver Hunt.
     7
     8        lookupExceptionHandler() is expecting 2 args: VM*, ExecState*.
     9        The repatch code was only passing an ExecState*. A crash ensues.
     10        This is now fixed.
     11
     12        * jit/JIT.cpp:
     13        (JSC::JIT::privateCompileExceptionHandlers):
     14        * jit/Repatch.cpp:
     15        (JSC::generateProtoChainAccessStub):
     16
    1172014-02-01  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r163027 r163274  
    715715        m_exceptionChecks.link(this);
    716716   
    717     // lookupExceptionHandler is passed one argument, the exec (the CallFrame*).
     717    // lookupExceptionHandler is passed two arguments, the VM and the exec (the CallFrame*).
    718718    move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR1);
    719719
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r163027 r163274  
    331331        MacroAssembler::Jump noException = stubJit.emitExceptionCheck(CCallHelpers::InvertedExceptionCheck);
    332332
    333         stubJit.setupArgumentsExecState();
     333        stubJit.setupArguments(CCallHelpers::TrustedImmPtr(vm), GPRInfo::callFrameRegister);
    334334        handlerCall = stubJit.call();
    335335        stubJit.jumpToExceptionHandler();
Note: See TracChangeset for help on using the changeset viewer.