[project @ 2003-10-22 11:11:59 by simonmar]
authorsimonmar <unknown>
Wed, 22 Oct 2003 11:11:59 +0000 (11:11 +0000)
committersimonmar <unknown>
Wed, 22 Oct 2003 11:11:59 +0000 (11:11 +0000)
thread_stack(RET_BCO): Grab the pointer to the BCO *before* threading
it.  Fixes crashes when using compacting GC with GHCi.

I noticed while debugging this that compacting GC is horrendously slow
now, which might have something to do with the new eval/apply PAP
layouts.  That's something to investigate later.

ghc/rts/GCCompact.c

index 4a28bd2..958a564 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: GCCompact.c,v 1.16 2003/04/22 16:25:10 simonmar Exp $
+ * $Id: GCCompact.c,v 1.17 2003/10/22 11:11:59 simonmar Exp $
  *
  * (c) The GHC Team 2001
  *
@@ -317,8 +317,8 @@ thread_stack(StgPtr p, StgPtr stack_end)
            nat size;
            
            p++;
-           thread(p);
            bco = (StgBCO *)*p;
+           thread(p);
            p++;
            size = BCO_BITMAP_SIZE(bco);
            thread_large_bitmap(p, BCO_BITMAP(bco), size);