Bug 237173 - operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of just DeferTermination.
Summary: operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of j...
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
Keywords: InRadar
Depends on:
Reported: 2022-02-24 17:57 PST by Mark Lam
Modified: 2022-02-25 11:04 PST (History)
7 users (show)

See Also:

proposed patch. (5.23 KB, patch)
2022-02-24 18:58 PST, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (5.23 KB, patch)
2022-02-24 19:05 PST, Mark Lam
ysuzuki: review+
Details | Formatted Diff | Diff
[fast-cq] patch for landing. (5.27 KB, patch)
2022-02-24 22:03 PST, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2022-02-24 17:57:08 PST
DeferTermination can throw the TerminationException on destruction of the scope object.  operationMaterializeObjectInOSR() was using DeferTermination resulting in the TerminationException being thrown on exit.  This trips up validateDFGExceptionHandling testing which is enabled on Debug builds.  The solution is simply to use DeferTerminationForAWhile instead, and let a more natural trap checkpoint throw the TerminationException instead.

Comment 1 Radar WebKit Bug Importer 2022-02-24 17:57:57 PST
Comment 2 Mark Lam 2022-02-24 18:58:11 PST
Created attachment 453165 [details]
proposed patch.
Comment 3 Mark Lam 2022-02-24 19:05:48 PST
Created attachment 453167 [details]
proposed patch.
Comment 4 Yusuke Suzuki 2022-02-24 19:15:31 PST
Comment on attachment 453167 [details]
proposed patch.

Comment 5 Mark Lam 2022-02-24 20:44:40 PST
Comment 6 Mark Lam 2022-02-24 21:27:04 PST
Turns out the watchdog timeout takes too long on a Release build, and the newly added test has ended with a StackOverflow error before a TerminationException is even thrown.  I'll just skip the test on Release builds.  It is only relevant for Debug builds anyway.
Comment 7 Mark Lam 2022-02-24 22:03:21 PST
Created attachment 453173 [details]
[fast-cq] patch for landing.
Comment 8 EWS 2022-02-25 11:04:52 PST
Committed r290517 (?): <https://commits.webkit.org/r290517>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453173 [details].