From: simonmar Date: Fri, 10 Aug 2001 10:52:12 +0000 (+0000) Subject: [project @ 2001-08-10 10:52:12 by simonmar] X-Git-Tag: Approximately_9120_patches~1287 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=310e95ebc5fb9211bb512adcec19152ac5a458d4;hp=d63bc4ad546181837cd3e6441ee14ba93bda1ab8;p=ghc-hetmet.git [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. --- 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