From e2eebc0d70de13de6d58e2af89f90ec71e54375c Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 23 Jun 2006 09:20:44 +0000 Subject: [PATCH] fix a couple of bugs in markSparkQueue (#799) --- rts/Sparks.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rts/Sparks.c b/rts/Sparks.c index 68ad19d..c7a1c9f 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -129,13 +129,15 @@ markSparkQueue (evac_fn evac) sparkp = pool->hd; to_sparkp = pool->hd; while (sparkp != pool->tl) { - ASSERT(to_sparkp<=sparkp); ASSERT(*sparkp!=NULL); ASSERT(LOOKS_LIKE_CLOSURE_PTR(((StgClosure *)*sparkp))); // ToDo?: statistics gathering here (also for GUM!) if (closure_SHOULD_SPARK(*sparkp)) { evac(sparkp); *to_sparkp++ = *sparkp; + if (to_sparkp == pool->lim) { + to_sparkp = pool->base; + } n++; } else { pruned_sparks++; -- 1.7.10.4