From 310e95ebc5fb9211bb512adcec19152ac5a458d4 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 10 Aug 2001 10:52:12 +0000 Subject: [PATCH] [project @ 2001-08-10 10:52:12 by simonmar] Fix an assertion: "large" objects may not necessarily start on a block boundary, but the only ones that are allowed not to are ByteArrays. --- ghc/rts/GC.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index e0a665e..67d744a 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.118 2001/08/08 14:14:08 simonmar Exp $ + * $Id: GC.c,v 1.119 2001/08/10 10:52:12 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -1338,9 +1338,10 @@ evacuate_large(StgPtr p) bdescr *bd = Bdescr(p); step *stp; - // should point to the beginning of the block - ASSERT(((W_)p & BLOCK_MASK) == 0); - + // object must be at the beginning of the block (or be a ByteArray) + ASSERT(get_itbl((StgClosure *)p)->type == ARR_WORDS || + (((W_)p & BLOCK_MASK) == 0)); + // already evacuated? if (bd->flags & BF_EVACUATED) { /* Don't forget to set the failed_to_evac flag if we didn't get -- 1.7.10.4