Bug 237173

Summary: operationMaterializeObjectInOSR should DeferTerminationForAWhile instead of just DeferTermination.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch.
none
proposed patch.
ysuzuki: review+
[fast-cq] patch for landing. none

Mark Lam
Reported 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. rdar://89428235
Attachments
proposed patch. (5.23 KB, patch)
2022-02-24 18:58 PST, Mark Lam
no flags
proposed patch. (5.23 KB, patch)
2022-02-24 19:05 PST, Mark Lam
ysuzuki: review+
[fast-cq] patch for landing. (5.27 KB, patch)
2022-02-24 22:03 PST, Mark Lam
no flags
Radar WebKit Bug Importer
Comment 1 2022-02-24 17:57:57 PST
Mark Lam
Comment 2 2022-02-24 18:58:11 PST
Created attachment 453165 [details] proposed patch.
Mark Lam
Comment 3 2022-02-24 19:05:48 PST
Created attachment 453167 [details] proposed patch.
Yusuke Suzuki
Comment 4 2022-02-24 19:15:31 PST
Comment on attachment 453167 [details] proposed patch. r=me
Mark Lam
Comment 5 2022-02-24 20:44:40 PST
Mark Lam
Comment 6 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.
Mark Lam
Comment 7 2022-02-24 22:03:21 PST
Created attachment 453173 [details] [fast-cq] patch for landing.
EWS
Comment 8 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].
Note You need to log in before you can comment on or make changes to this bug.