Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/48c3d271fe14380000f81f21e03bf7d77b9af16f

>---------------------------------------------------------------

commit 48c3d271fe14380000f81f21e03bf7d77b9af16f
Author: Simon Marlow <[email protected]>
Date:   Thu Apr 12 11:41:17 2012 +0100

    Fix crash with tiny initial stack size (#5993)
    
    MERGED from commit 5eabdc1675b8b5bc9fcdfb96ab63d14d42ca2d5b

>---------------------------------------------------------------

 rts/Threads.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/Threads.c b/rts/Threads.c
index fc520c6..3aed45b 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -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



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to