Skip to content

Commit

Permalink
Fix crash with tiny initial stack size (#5993)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmar committed Apr 12, 2012
1 parent 392c288 commit 5eabdc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Threads.c
Expand Up @@ -66,8 +66,8 @@ createThread(Capability *cap, nat size)
/* sched_mutex is *not* required */

/* catch ridiculously small stack sizes */
if (size < MIN_STACK_WORDS + sizeofW(StgStack)) {
size = MIN_STACK_WORDS + sizeofW(StgStack);
if (size < MIN_STACK_WORDS + sizeofW(StgStack) + sizeofW(StgTSO)) {
size = MIN_STACK_WORDS + sizeofW(StgStack) + sizeofW(StgTSO);
}

/* The size argument we are given includes all the per-thread
Expand Down

0 comments on commit 5eabdc1

Please sign in to comment.