Changeset 290283 in webkit


Ignore:
Timestamp:
Feb 21, 2022 6:16:28 PM (5 months ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Fix ShadowRealm unwinding
https://bugs.webkit.org/show_bug.cgi?id=237001

Reviewed by Saam Barati.

JSTests:

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch fixes a crash bug found by test262. Regardless of it is RemoteFunction,
we should handle it as the same way to the other normal host functions except
for setting m_seenRemoteFunction = true flag. Previously, we are early returning,
this is wrong since we should stop unwinding if the caller is entry frame.

  • interpreter/Interpreter.cpp:

(JSC::UnwindFunctor::operator() const):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r290282 r290283  
     12022-02-21  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Fix ShadowRealm unwinding
     4        https://bugs.webkit.org/show_bug.cgi?id=237001
     5
     6        Reviewed by Saam Barati.
     7
     8        * test262/expectations.yaml:
     9
    1102022-02-21  Yusuke Suzuki  <ysuzuki@apple.com>
    211
  • trunk/JSTests/test262/expectations.yaml

    r290268 r290283  
    829829  default: 'Test262Error: expect a TypeError on name getter throwing Expected a TypeError but got a Error'
    830830  strict mode: 'Test262Error: expect a TypeError on name getter throwing Expected a TypeError but got a Error'
    831 test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-proxied-observes-boundary.js:
    832   strict mode: 'Bad exit code: 11'
    833831test/built-ins/ShadowRealm/prototype/evaluate/wrapped-function-throws-typeerror-from-caller-realm.js:
    834832  default: 'Test262Error: throws TypeError if arguments are not wrappable Expected a TypeError but got a different error constructor with the same name'
  • trunk/Source/JavaScriptCore/ChangeLog

    r290282 r290283  
     12022-02-21  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Fix ShadowRealm unwinding
     4        https://bugs.webkit.org/show_bug.cgi?id=237001
     5
     6        Reviewed by Saam Barati.
     7
     8        This patch fixes a crash bug found by test262. Regardless of it is RemoteFunction,
     9        we should handle it as the same way to the other normal host functions except
     10        for setting m_seenRemoteFunction = true flag. Previously, we are early returning,
     11        this is wrong since we should stop unwinding if the caller is entry frame.
     12
     13        * interpreter/Interpreter.cpp:
     14        (JSC::UnwindFunctor::operator() const):
     15
    1162022-02-21  Yusuke Suzuki  <ysuzuki@apple.com>
    217
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r289417 r290283  
    612612#endif
    613613
    614         if (!m_callFrame->isWasmFrame() &&  JSC::isRemoteFunction(m_vm, m_callFrame->jsCallee()) && !m_isTermination) {
     614        if (!m_callFrame->isWasmFrame() && JSC::isRemoteFunction(m_vm, m_callFrame->jsCallee()) && !m_isTermination) {
    615615            // Continue searching for a handler, but mark that a marshalling function was on the stack so that we can
    616616            // translate the exception before jumping to the handler.
    617617            const_cast<UnwindFunctor*>(this)->m_seenRemoteFunction = true;
    618             return StackVisitor::Continue;
    619618        }
    620619
Note: See TracChangeset for help on using the changeset viewer.