Changeset 289877 in webkit


Ignore:
Timestamp:
Feb 15, 2022 10:12:08 PM (2 years ago)
Author:
mark.lam@apple.com
Message:

Defer TerminationsExceptions while in operationMaterializeObjectInOSR.
https://bugs.webkit.org/show_bug.cgi?id=236686
rdar://81337114

Reviewed by Saam Barati.

JSTests:

These tests are identical except that they are customized with different watchdog
timeout periods for a Debug / Release build. This is a necessary condition in
order for the test to manifest this issue if the code is regressed.

  • stress/termination-exception-in-operationMaterializeObjectInOSR-debug.js: Added.
  • stress/termination-exception-in-operationMaterializeObjectInOSR-release.js: Added.

Source/JavaScriptCore:

operationMaterializeObjectInOSR expects to always succeed. It is difficult (and
not worth the effort) to make it be able to handle interruptions by the
TerminationException. Since operationMaterializeObjectInOSR is guaranteed to
finish running in some finite time, it is reasonable to just defer handling a
pending TerminationException until the function returns.

  • ftl/FTLOperations.cpp:

(JSC::FTL::JSC_DEFINE_JIT_OPERATION):

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r289791 r289877  
     12022-02-15  Mark Lam  <mark.lam@apple.com>
     2
     3        Defer TerminationsExceptions while in operationMaterializeObjectInOSR.
     4        https://bugs.webkit.org/show_bug.cgi?id=236686
     5        rdar://81337114
     6
     7        Reviewed by Saam Barati.
     8
     9        These tests are identical except that they are customized with different watchdog
     10        timeout periods for a Debug / Release build.  This is a necessary condition in
     11        order for the test to manifest this issue if the code is regressed.
     12
     13        * stress/termination-exception-in-operationMaterializeObjectInOSR-debug.js: Added.
     14        * stress/termination-exception-in-operationMaterializeObjectInOSR-release.js: Added.
     15
    1162022-02-15  Xan Lopez  <xan@igalia.com>
    217
  • trunk/Source/JavaScriptCore/ChangeLog

    r289863 r289877  
     12022-02-15  Mark Lam  <mark.lam@apple.com>
     2
     3        Defer TerminationsExceptions while in operationMaterializeObjectInOSR.
     4        https://bugs.webkit.org/show_bug.cgi?id=236686
     5        rdar://81337114
     6
     7        Reviewed by Saam Barati.
     8
     9        operationMaterializeObjectInOSR expects to always succeed.  It is difficult (and
     10        not worth the effort) to make it be able to handle interruptions by the
     11        TerminationException.  Since operationMaterializeObjectInOSR is guaranteed to
     12        finish running in some finite time, it is reasonable to just defer handling a
     13        pending TerminationException until the function returns.
     14
     15        * ftl/FTLOperations.cpp:
     16        (JSC::FTL::JSC_DEFINE_JIT_OPERATION):
     17
    1182022-02-15  Mark Lam  <mark.lam@apple.com>
    219
  • trunk/Source/JavaScriptCore/ftl/FTLOperations.cpp

    r285636 r289877  
    11/*
    2  * Copyright (C) 2014-2021 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4848#include "JSSetIterator.h"
    4949#include "RegExpObject.h"
     50#include "VMTrapsInlines.h"
    5051#include <wtf/Assertions.h>
    5152
     
    189190    CallFrame* callFrame = DECLARE_CALL_FRAME(vm);
    190191    JITOperationPrologueCallFrameTracer tracer(vm, callFrame);
     192
     193    // It's too hairy to handle TerminationExceptions during OSR object materialization.
     194    // Let's just wait until after.
     195    DeferTermination deferTermination(vm);
    191196
    192197    // We cannot GC. We've got pointers in evil places.
Note: See TracChangeset for help on using the changeset viewer.