[project @ 2005-02-11 12:20:12 by simonmar]
authorsimonmar <unknown>
Fri, 11 Feb 2005 12:20:12 +0000 (12:20 +0000)
committersimonmar <unknown>
Fri, 11 Feb 2005 12:20:12 +0000 (12:20 +0000)
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

index a57fa2c..8830582 100644 (file)
@@ -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);