I think I've figured out why these tests are failing on some, but not
 all, platforms -- it's a GC bug. Specifically, we're not including the
 class_hash as part of the root set, so the garbage collector can
 potentially reclaim it before we try to use it.

 The patch below seems to fix the problem, but I'm not sufficiently up to
 speed on the GC internals to know if that's all that needs to be done, so
 I'm posting it here for comment.

 Simon

Index: dod.c
===================================================================
RCS file: /cvs/public/parrot/dod.c,v
retrieving revision 1.64
diff -u -r1.64 dod.c
--- dod.c       21 Jul 2003 18:00:23 -0000      1.64
+++ dod.c       23 Jul 2003 17:40:01 -0000
@@ -154,6 +154,9 @@
         stash = stash->parent_stash;
     }

+    /* Now mark the class hash */
+    pobject_lives(interpreter, (PObj *)interpreter->class_hash);
+
     /* Now walk the pmc stack. Make sure to walk from top down since stack may
      * have segments above top that we shouldn't walk. */
     for (cur_chunk = interpreter->ctx.pmc_reg_top; cur_chunk;

Reply via email to