Bug 198065

Summary: [YARR] Properly handle RegExp's that require large ParenContext space
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, lokihardt, mark.lam, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Updated patch in light of r245586 keith_miller: review+

Description Michael Saboff 2019-05-20 20:36:50 PDT
In initParenContextFreeList() we use INT16_MAX to determine if we should create a ParenContext free list.  We should be using the VM::patternContextBufferSize, as that is the amount of memory we have available when executing the JIT'ed code.  We should also fail the compile instead of bailing out with a jump to the JIT code failure return as this could potentially save JIT memory that could be consumed by large RegExp functions that won't execute to completion due to their ParenContext size exceeding VM::patternContextBufferSize.
Comment 1 Michael Saboff 2019-05-20 20:37:00 PDT
<rdar://problem/50427019>
Comment 2 Michael Saboff 2019-05-20 20:48:56 PDT
Created attachment 370296 [details]
Patch
Comment 3 Keith Miller 2019-05-21 11:03:58 PDT
I already fixed this in https://trac.webkit.org/changeset/245586. You might want to make another patch for your other changes though.
Comment 4 Saam Barati 2019-05-22 13:25:05 PDT
Comment on attachment 370296 [details]
Patch

Clearing r? based on Keith's feedback
Comment 5 Michael Saboff 2019-05-24 17:59:55 PDT
Created attachment 370612 [details]
Updated patch in light of r245586
Comment 6 Keith Miller 2019-05-28 09:55:38 PDT
Comment on attachment 370612 [details]
Updated patch in light of r245586

r=me.
Comment 7 Michael Saboff 2019-05-28 10:19:11 PDT
Committed r245815: <https://trac.webkit.org/changeset/245815>
Comment 8 Michael Saboff 2019-08-12 12:55:49 PDT
*** Bug 197536 has been marked as a duplicate of this bug. ***