Bug 211547 - Add stack checks to the DFG and FTL bytecode parser.
Summary: Add stack checks to the DFG and FTL bytecode parser.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-06 20:35 PDT by Mark Lam
Modified: 2020-05-07 12:26 PDT (History)
10 users (show)

See Also:


Attachments
proposed patch. (10.84 KB, patch)
2020-05-06 21:07 PDT, Mark Lam
no flags Details | Formatted Diff | Diff
proposed patch. (10.83 KB, patch)
2020-05-06 21:38 PDT, Mark Lam
ysuzuki: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2020-05-06 20:35:17 PDT
Inlining can cause some level of recursion of the DFG bytecode parser.  We should do a stack check at each inlining check before recursing.  If a stack overflow appears to be imminent, then just refuse to inline, and therefore, don't recurse deeper into the parser.
Comment 1 Radar WebKit Bug Importer 2020-05-06 20:35:42 PDT
<rdar://problem/62958880>
Comment 2 Mark Lam 2020-05-06 21:07:19 PDT
Created attachment 398701 [details]
proposed patch.

Let's try this on the EWS first.
Comment 3 Mark Lam 2020-05-06 21:38:17 PDT
Created attachment 398702 [details]
proposed patch.
Comment 4 Yusuke Suzuki 2020-05-06 23:32:12 PDT
Comment on attachment 398702 [details]
proposed patch.

r=me
Comment 5 Mark Lam 2020-05-07 08:17:28 PDT
The ios-wk2 EWS bot failures don't look related to this patch.
Comment 6 Mark Lam 2020-05-07 12:26:35 PDT
Thanks for the review.  Landed in r261325: <http://trac.webkit.org/r261325>.