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

Changeset 237641 in webkit


Ignore:
Timestamp:
Oct 31, 2018, 9:39:06 AM (8 years ago)
Author:
Tadeu Zagallo
Message:

REGRESSION(r237547): Exception handlers should be aware of wide opcodes
https://bugs.webkit.org/show_bug.cgi?id=191108
<rdar://problem/45690700>

Reviewed by Saam Barati.

JSTests:

  • stress/wide-op_catch.js: Added.

(catch):

Source/JavaScriptCore:

When linking the handler, we need to check whether the target op_catch is
wide or narrow in order to chose the right code pointer for the handler.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r237577 r237641  
     12018-10-31  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        REGRESSION(r237547): Exception handlers should be aware of wide opcodes
     4        https://bugs.webkit.org/show_bug.cgi?id=191108
     5        <rdar://problem/45690700>
     6
     7        Reviewed by Saam Barati.
     8
     9        * stress/wide-op_catch.js: Added.
     10        (catch):
     11
    1122018-10-29  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/Source/JavaScriptCore/ChangeLog

    r237638 r237641  
     12018-10-31  Tadeu Zagallo  <tzagallo@apple.com>
     2
     3        REGRESSION(r237547): Exception handlers should be aware of wide opcodes
     4        https://bugs.webkit.org/show_bug.cgi?id=191108
     5        <rdar://problem/45690700>
     6
     7        Reviewed by Saam Barati.
     8
     9        When linking the handler, we need to check whether the target op_catch is
     10        wide or narrow in order to chose the right code pointer for the handler.
     11
     12        * bytecode/CodeBlock.cpp:
     13        (JSC::CodeBlock::finishCreation):
     14
    1152018-10-31  Dominik Infuehr  <dinfuehr@igalia.com>
    216
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r237547 r237641  
    460460                HandlerInfo& handler = m_rareData->m_exceptionHandlers[i];
    461461#if ENABLE(JIT)
    462                 handler.initialize(unlinkedHandler, CodeLocationLabel<ExceptionHandlerPtrTag>(LLInt::getCodePtr<BytecodePtrTag>(op_catch).retagged<ExceptionHandlerPtrTag>()));
     462                MacroAssemblerCodePtr<BytecodePtrTag> codePtr = m_instructions->at(unlinkedHandler.target)->isWide()
     463                    ? LLInt::getWideCodePtr<BytecodePtrTag>(op_catch)
     464                    : LLInt::getCodePtr<BytecodePtrTag>(op_catch);
     465                handler.initialize(unlinkedHandler, CodeLocationLabel<ExceptionHandlerPtrTag>(codePtr.retagged<ExceptionHandlerPtrTag>()));
    463466#else
    464467                handler.initialize(unlinkedHandler);
Note: See TracChangeset for help on using the changeset viewer.