Bug 114978

Summary: Use correct stack size on Solaris and OpenBSD
Product: WebKit Reporter: David <david>
Component: WebKit Misc.Assignee: Patrick R. Gansterer <paroga>
Status: RESOLVED FIXED    
Severity: Major CC: barraclough, benjamin, cmarcelo, commit-queue, ggaren, landry, oliver, robert
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Other   
Bug Depends on:    
Bug Blocks: 26276    
Attachments:
Description Flags
Use correct stack size on OpenBSD
none
Patch none

Description David 2013-04-22 11:51:03 PDT
Created attachment 199057 [details]
Use correct stack size on OpenBSD

On OpenBSD, applications using webkit 2.0.1 get 

** Message: console message: undefined @0: RangeError: Maximum call
stack size exceeded.

on startup with javascript enabled.  It basically causes Javascript not to work.

In StackBounds.cpp, webkit says
// FIXME: remove this! - this code unsafely guesses at stack sizes!
#if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD)

Well, on OpenBSD, we don't need to guess.  Attached is a patch that uses stack size returned from pthread_stackseg_np.  The makes things work just fine.  No errors and no crashes.  Been tested by multiple users.

Also, on OpenBSD, hppa/hppa64 grows its stack size up, so add a define to give the hppa archs a chance to work.
Comment 1 David 2013-04-24 11:07:23 PDT
Would anyone like to commit this?  It has been tested and shown to fix i386/amd64/macppc.
Comment 2 Robert Hogan 2013-05-06 13:07:24 PDT
(In reply to comment #1)
> Would anyone like to commit this?  It has been tested and shown to fix i386/amd64/macppc.

git or svn blame the file you are changing and cc recent contributors to that file on this bug so they can review it. Then follow http://www.webkit.org/coding/contributing.html and submit the patch again.
Comment 3 Patrick R. Gansterer 2013-05-21 05:17:50 PDT
Created attachment 202416 [details]
Patch
Comment 4 WebKit Commit Bot 2013-05-23 11:51:55 PDT
Comment on attachment 202416 [details]
Patch

Rejecting attachment 202416 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-03', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 202416, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
    -> origin/master
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 150596 = 74f0f738df2239e5026f59a7581cb5a04351add5
r150599 = 1f7190513b569f67969ff16ee88b3a53d3186922
r150600 = 49e6d85a525d1388359e9d470a4f19ff3e5e3b82
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.

Full output: http://webkit-queues.appspot.com/results/651042
Comment 5 Patrick R. Gansterer 2013-05-23 12:24:51 PDT
Comment on attachment 202416 [details]
Patch

Clearing flags on attachment: 202416

Committed r150603: <http://trac.webkit.org/changeset
/150603>
Comment 6 Patrick R. Gansterer 2013-05-23 12:25:02 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Patrick R. Gansterer 2013-05-27 23:32:53 PDT
Recommited in r150786 after rollout in r150621.