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.
<rdar://problem/50427019>
Created attachment 370296 [details] Patch
I already fixed this in https://trac.webkit.org/changeset/245586. You might want to make another patch for your other changes though.
Comment on attachment 370296 [details] Patch Clearing r? based on Keith's feedback
Created attachment 370612 [details] Updated patch in light of r245586
Comment on attachment 370612 [details] Updated patch in light of r245586 r=me.
Committed r245815: <https://trac.webkit.org/changeset/245815>
*** Bug 197536 has been marked as a duplicate of this bug. ***