Bug 198065 - [YARR] Properly handle RegExp's that require large ParenContext space
Summary: [YARR] Properly handle RegExp's that require large ParenContext space
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
: 197536 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-05-20 20:36 PDT by Michael Saboff
Modified: 2019-08-12 12:55 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.33 KB, patch)
2019-05-20 20:48 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff
Updated patch in light of r245586 (3.67 KB, patch)
2019-05-24 17:59 PDT, Michael Saboff
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***