From: simonm Date: Wed, 17 Feb 1999 17:35:32 +0000 (+0000) Subject: [project @ 1999-02-17 17:35:31 by simonm] X-Git-Tag: Approximately_9120_patches~6540 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=75a60703d6f42b21efff37c31590fd98cbefbda8;p=ghc-hetmet.git [project @ 1999-02-17 17:35:31 by simonm] Fix a couple of uninitialized data reads. --- diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 965ee09..c70f408 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.35 1999/02/17 15:04:40 simonm Exp $ + * $Id: GC.c,v 1.36 1999/02/17 17:35:32 simonm Exp $ * * (c) The GHC Team 1998-1999 * @@ -399,6 +399,9 @@ void GarbageCollect(void (*get_roots)(void)) loop2: for (gen = RtsFlags.GcFlags.generations-1; gen >= 0; gen--) { for (st = generations[gen].n_steps-1; st >= 0 ; st--) { + if (gen == 0 && step == 0) { + continue; + } step = &generations[gen].steps[st]; evac_gen = gen; if (step->hp_bd != step->scan_bd || step->scan < step->hp) { diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index e94094b..c309b3f 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Storage.c,v 1.12 1999/02/05 16:03:01 simonm Exp $ + * $Id: Storage.c,v 1.13 1999/02/17 17:35:31 simonm Exp $ * * (c) The GHC Team, 1998-1999 * @@ -114,6 +114,8 @@ initStorage (void) step->hp = NULL; step->hpLim = NULL; step->hp_bd = NULL; + step->scan = NULL; + step->scan_bd = NULL; step->large_objects = NULL; step->new_large_objects = NULL; step->scavenged_large_objects = NULL;