diff options
author | Austin Seipp <aseipp@pobox.com> | 2013-09-08 16:17:36 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2013-09-08 16:17:36 -0500 |
commit | 88dba610df290ff7807a76f702f2e5d41887500b (patch) | |
tree | e1324062ceef817866771e5bb3f4a93151ba3fb4 /rts/Threads.c | |
parent | c798a8c6c66d826efdc0201fa56d45337eecc2af (diff) | |
download | haskell-88dba610df290ff7807a76f702f2e5d41887500b.tar.gz |
Revert "Default to infinite stack size (#8189)"
This reverts commit d85044f6b201eae0a9e453b89c0433608e0778f0.
Diffstat (limited to 'rts/Threads.c')
-rw-r--r-- | rts/Threads.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/rts/Threads.c b/rts/Threads.c index 90d3dfd115..14fb7e872c 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -499,8 +499,7 @@ threadStackOverflow (Capability *cap, StgTSO *tso) IF_DEBUG(sanity,checkTSO(tso)); - if ( (RtsFlags.GcFlags.maxStkSize > 0) // don't throw if we have infinite stack - && (tso->tot_stack_size >= RtsFlags.GcFlags.maxStkSize) + if (tso->tot_stack_size >= RtsFlags.GcFlags.maxStkSize && !(tso->flags & TSO_BLOCKEX)) { // NB. never raise a StackOverflow exception if the thread is // inside Control.Exceptino.block. It is impractical to protect @@ -576,12 +575,7 @@ threadStackOverflow (Capability *cap, StgTSO *tso) "allocating new stack chunk of size %d bytes", chunk_size * sizeof(W_)); - new_stack = (StgStack*) allocateFail(cap, chunk_size); - if (new_stack == NULL) { - // We've really run out of memory in the heap, so die. - stackOverflow(tso); - stg_exit(EXIT_STACKOVERFLOW); - } + new_stack = (StgStack*) allocate(cap, chunk_size); SET_HDR(new_stack, &stg_STACK_info, old_stack->header.prof.ccs); TICK_ALLOC_STACK(chunk_size); |