From c9867f66abba10a8ca3adc6b4e92f712f2714812 Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 26 Mar 2003 14:52:02 +0000 Subject: [PATCH] [project @ 2003-03-26 14:52:02 by simonmar] Fix bug in previous two commits: must check HEAP_ALLOCED() before using Bdescr(). --- ghc/rts/GC.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index a0f119f..c6744ed 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.150 2003/03/24 15:33:25 simonmar Exp $ + * $Id: GC.c,v 1.151 2003/03/26 14:52:02 simonmar Exp $ * * (c) The GHC Team 1998-2003 * @@ -2016,7 +2016,8 @@ selector_loop: // So we use the block-descriptor test to find out if we're in // to-space. // - if (Bdescr((StgPtr)selectee)->flags & BF_EVACUATED) { + if (HEAP_ALLOCED(selectee) && + Bdescr((StgPtr)selectee)->flags & BF_EVACUATED) { goto bale_out; } -- 1.7.10.4