From a186d6f72aa221772ffeccb99c6c538c4505b0d7 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 11 Feb 2005 12:20:12 +0000 Subject: [PATCH] [project @ 2005-02-11 12:20:12 by simonmar] Fix a bug: thunk_selector_depth was being incremented before checking that we had reached the depth limit, and not decremented if we had reached the limit. --- ghc/rts/GC.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index a57fa2c..8830582 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -2117,10 +2117,10 @@ selector_loop: // check that we don't recurse too much, re-using the // depth bound also used in evacuate(). - thunk_selector_depth++; - if (thunk_selector_depth > MAX_THUNK_SELECTOR_DEPTH) { + if (thunk_selector_depth >= MAX_THUNK_SELECTOR_DEPTH) { break; } + thunk_selector_depth++; val = eval_thunk_selector(info->layout.selector_offset, (StgSelector *)selectee); -- 1.7.10.4