From deda5eaa86852c08cbafc739ef4df7507cc89aa3 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 26 Jul 2005 15:16:40 +0000 Subject: [PATCH] [project @ 2005-07-26 15:16:40 by simonmar] Avoid recording objects in the mutable list of generation 0 (bug introduced on the HEAD recently, it seems) --- ghc/rts/GC.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 47e4971..aa3d1bc 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -3063,7 +3063,9 @@ scavenge(step *stp) */ if (failed_to_evac) { failed_to_evac = rtsFalse; - recordMutableGen((StgClosure *)q, stp->gen); + if (stp->gen_no > 0) { + recordMutableGen((StgClosure *)q, stp->gen); + } } } @@ -3400,7 +3402,9 @@ linear_scan: if (failed_to_evac) { failed_to_evac = rtsFalse; - recordMutableGen((StgClosure *)q, &generations[evac_gen]); + if (evac_gen > 0) { + recordMutableGen((StgClosure *)q, &generations[evac_gen]); + } } // mark the next bit to indicate "scavenged" @@ -4075,7 +4079,9 @@ scavenge_large(step *stp) p = bd->start; if (scavenge_one(p)) { - recordMutableGen((StgClosure *)p, stp->gen); + if (stp->gen_no > 0) { + recordMutableGen((StgClosure *)p, stp->gen); + } } } } -- 1.7.10.4