Bug 126036 - CStack: The JIT does not need a slow path stack check
Summary: CStack: The JIT does not need a slow path stack check
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 125928
  Show dependency treegraph
 
Reported: 2013-12-19 18:19 PST by Mark Lam
Modified: 2013-12-19 18:35 PST (History)
5 users (show)

See Also:


Attachments
the patch. (7.40 KB, patch)
2013-12-19 18:25 PST, Mark Lam
ggaren: 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 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>.