Bug 241927 - Watchdog doesn't work as expected for some tail calls
Summary: Watchdog doesn't work as expected for some tail calls
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2022-06-23 12:50 PDT by Yijia Huang
Modified: 2022-06-30 12:51 PDT (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Yijia Huang 2022-06-23 12:50:10 PDT
Options "--watchdog=1000 --watchdog-exception-ok" suppose to let jsc terminate a hanging Javascript program with a time out 1000ms. However, the options fail on this example with a ToT build.
function foo(a) {
    'use strict';
    return foo(a, 0);

Comment 1 Mark Lam 2022-06-23 14:50:06 PDT
Looks like global common subexpression elimination eliminated an InvalidationPoint.  That's the reason the watchdog wasn't able to terminate the script.
Comment 2 Yijia Huang 2022-06-28 16:42:49 PDT
We added a --usePollingTraps=true option to stress test call-link-info-osrexit-repatch.js as a workaround. We should remove that once we fix this problem.
Comment 3 Radar WebKit Bug Importer 2022-06-30 12:51:12 PDT