summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2013-09-06 22:48:52 -0400
committerAustin Seipp <austin@well-typed.com>2013-10-25 09:14:29 -0500
commitd3b24e10d419f48e0839b08eb740d7138e56b390 (patch)
treeeaec2d7e447c73306a105d8a97d78a78e5203afb /rts
parent8f3ea7d7b88b7dac26756e8af9f9defd4208e521 (diff)
downloadhaskell-d3b24e10d419f48e0839b08eb740d7138e56b390.tar.gz
rts: Allow for infinite stack size
This is encoded as RtsFlags.GcFlags.maxStkSize == 0.
Diffstat (limited to 'rts')
-rw-r--r--rts/Threads.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/Threads.c b/rts/Threads.c
index 8ee8d4f09a..af4353fc49 100644
--- a/rts/Threads.c
+++ b/rts/Threads.c
@@ -499,7 +499,8 @@ threadStackOverflow (Capability *cap, StgTSO *tso)
IF_DEBUG(sanity,checkTSO(tso));
- if (tso->tot_stack_size >= RtsFlags.GcFlags.maxStkSize) {
+ if (RtsFlags.GcFlags.maxStkSize > 0
+ && tso->tot_stack_size >= RtsFlags.GcFlags.maxStkSize) {
// #3677: In a stack overflow situation, stack squeezing may
// reduce the stack size, but we don't know whether it has been
// reduced enough for the stack check to succeed if we try