Bug 72455 - QNX StackBase doesn't take guard page into account
Summary: QNX StackBase doesn't take guard page into account
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P1 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 19:54 PST by George Staikos
Modified: 2011-11-16 04:36 PST (History)
2 users (show)

See Also:


Attachments
Patch to fix the crash by excluding the guard page from the stack. (1022 bytes, patch)
2011-11-15 19:54 PST, George Staikos
no flags Details | Formatted Diff | Diff
Add patch with changelog (1.60 KB, patch)
2011-11-15 20:46 PST, George Staikos
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Staikos 2011-11-15 19:54:47 PST
Created attachment 115305 [details]
Patch to fix the crash by excluding the guard page from the stack.

There is a 4kb guard page on the stack on QNX.  The current code doesn't take this into account, causing it to crash before hitting the recursion/stack guard in WTF.  Crashes multiple layout tests including large-expressions.js and regress-96526-002.js
Comment 1 George Staikos 2011-11-15 19:57:07 PST
Comment on attachment 115305 [details]
Patch to fix the crash by excluding the guard page from the stack.

Missing changelog
Comment 2 George Staikos 2011-11-15 20:46:52 PST
Created attachment 115314 [details]
Add patch with changelog
Comment 3 Daniel Bates 2011-11-15 21:11:40 PST
Comment on attachment 115314 [details]
Add patch with changelog

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

Thanks for the patch!

> Source/JavaScriptCore/wtf/StackBounds.cpp:110
> +    m_bound = static_cast<char*>(stackBase) + 0x1000; // 4kb guard page

This is OK as-is. We should look to query the OS for the page size.
Comment 4 WebKit Review Bot 2011-11-15 22:21:20 PST
Comment on attachment 115314 [details]
Add patch with changelog

Clearing flags on attachment: 115314

Committed r100406: <http://trac.webkit.org/changeset/100406>
Comment 5 WebKit Review Bot 2011-11-15 22:21:25 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 George Staikos 2011-11-16 04:36:40 PST
(In reply to comment #3)
> (From update of attachment 115314 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=115314&action=review
> 
> Thanks for the patch!
> 
> > Source/JavaScriptCore/wtf/StackBounds.cpp:110
> > +    m_bound = static_cast<char*>(stackBase) + 0x1000; // 4kb guard page
> 
> This is OK as-is. We should look to query the OS for the page size.

There is no way to do that yet other than read the book, as far as I know.