[webkit-changes] [WebKit/WebKit] 512db9: [JSC] Watchdog calls valid timers "stale" on Windows

Ross Kirsling noreply at github.com
Thu Apr 6 22:37:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 512db9a6900b400f9ce93e90e6e178fa74fef03e
      https://github.com/WebKit/WebKit/commit/512db9a6900b400f9ce93e90e6e178fa74fef03e
  Author: Ross Kirsling <ross.kirsling at sony.com>
  Date:   2023-04-06 (Thu, 06 Apr 2023)

  Changed paths:
    M Source/JavaScriptCore/runtime/Watchdog.cpp

  Log Message:
  -----------
  [JSC] Watchdog calls valid timers "stale" on Windows
https://bugs.webkit.org/show_bug.cgi?id=255135

Reviewed by Mark Lam.

The following tests tend to time out on Win JSC:
- stress/bounds-checking-in-cold-loop.js
- stress/call-link-info-osrexit-repatch.js
- stress/call-varargs-inlining-should-not-clobber-previous-to-free-register.js
- stress/ftl-ai-filter-phantoms-should-clear-clear-value.js
- stress/ftl-entry-osr-exit-has-nullptr-node.js
- stress/has-indexed-property-with-worsening-array-mode.js
- stress/polling-based-trap-on-unlinked-dfg.js
- stress/reduce-loop-strength-multiple-exits.js
- stress/regress-189227-watchdog-on-infinite-loop.js
- stress/suppress-TerminationException-in-operationGetPrivateNameOptimize.js

The cause is that Watchdog::shouldTerminate fires as much as 15ms prior to m_deadline,
so one simple solution is to add a 20ms epsilon value when comparing "now" against the deadline.

Technically, we wouldn't need to platform-restrict this value -- after all, the early out appears more concerned with
"when m_deadline is infinity" than "when we're a little early" -- but then, the issue only seems to occur on Windows.

* Source/JavaScriptCore/runtime/Watchdog.cpp:
(JSC::Watchdog::shouldTerminate):

Canonical link: https://commits.webkit.org/262701@main




More information about the webkit-changes mailing list