Bug 126026 - CStack Branch: Fix call operationStackCheck to check the proper stack
Summary: CStack Branch: Fix call operationStackCheck to check the proper stack
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-19 16:10 PST by Michael Saboff
Modified: 2013-12-19 16:36 PST (History)
0 users

See Also:


Attachments
Patch (1.57 KB, patch)
2013-12-19 16:14 PST, Michael Saboff
mark.lam: 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 2013-12-19 16:10:54 PST
JITOperations::operationStackCheck() always checks the JSStack.  It should check the correct stack based on the state of ENABLE(LLINT_CLOOP).
Comment 1 Michael Saboff 2013-12-19 16:14:52 PST
Created attachment 219698 [details]
Patch
Comment 2 Mark Lam 2013-12-19 16:18:16 PST
Comment on attachment 219698 [details]
Patch

r=me.  This is actually more conservative than it needs to be, it’s good enough for now until JSStack can be refactored to handle the check for both cases (coming soon).
Comment 3 Michael Saboff 2013-12-19 16:19:07 PST
Committed r160871: <http://trac.webkit.org/changeset/160871>
Comment 4 Geoffrey Garen 2013-12-19 16:27:34 PST
Comment on attachment 219698 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219698&action=review

> Source/JavaScriptCore/jit/JITOperations.cpp:89
> +    if (!exec->vm().isSafeToRecurse(-codeBlock->stackPointerOffset() * sizeof(Register)))

Since you're counting registers, you should use frameRegisterCount(), instead of manually converting based on SP.
Comment 5 Michael Saboff 2013-12-19 16:30:55 PST
(In reply to comment #4)
> (From update of attachment 219698 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219698&action=review
> 
> > Source/JavaScriptCore/jit/JITOperations.cpp:89
> > +    if (!exec->vm().isSafeToRecurse(-codeBlock->stackPointerOffset() * sizeof(Register)))
> 
> Since you're counting registers, you should use frameRegisterCount(), instead of manually converting based on SP.

I change it.
Comment 6 Michael Saboff 2013-12-19 16:36:49 PST
(In reply to comment #4)
> (From update of attachment 219698 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219698&action=review
> 
> > Source/JavaScriptCore/jit/JITOperations.cpp:89
> > +    if (!exec->vm().isSafeToRecurse(-codeBlock->stackPointerOffset() * sizeof(Register)))
> 
> Since you're counting registers, you should use frameRegisterCount(), instead of manually converting based on SP.

Landed this update in change set r160874: <http://trac.webkit.org/changeset/160874>