Bug 126036

Summary: CStack: The JIT does not need a slow path stack check
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, mhahnenberg, msaboff, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 125928    
Attachments:
Description Flags
the patch. ggaren: review+

Description Mark Lam 2013-12-19 18:19:51 PST
The JIT uses the C stack which is not growable.  Hence, by the time we get to the operationStackCheck() helper, a stack overflow is imminent.  Redoing the stack check there will achieve nothing.

Hence, we'll rename operationStackCheck() to operationThrowStackOverflowError(), and change the JIT code to reflect this reality that a StackOverflowError will be thrown unconditionally when we call this helper.
Comment 1 Mark Lam 2013-12-19 18:25:02 PST
Created attachment 219710 [details]
the patch.
Comment 2 Geoffrey Garen 2013-12-19 18:31:17 PST
Comment on attachment 219710 [details]
the patch.

r=me

Once we have a host zone reserved, we should just compare SP to addressOfJSStackLimit.
Comment 3 Mark Lam 2013-12-19 18:35:29 PST
Thanks for the review.  Landed in r160890: <http://trac.webkit.org/r160890>.