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;
D'oh! Yeah, that's the right thing to do. I *knew* I'd forgotten
something. (I just had no idea how much stuff I'd forgotten)
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
> At 1:45 PM -0400 7/23/03, Simon Glover wrote:
> >
> > 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.
>
> D'oh! Yeah, that's the right thing to do. I *knew* I'd forgotten
> something. (I just had no idea how much stuff I'd forgotten)
OK, I've committed it.
Simon
I'll just confirm that FreeBSD/x86 now passes objects.t.
--
Lars Balker Rasmussen Consult::Perl
Failed Test Status Wstat Total Fail Failed List of Failed
----------------------------------------------------------------------------
----
t/op/stacks.t 2 512 56 2 3.57% 6, 12
t/pmc/intlist.t 1 256 9 1 11.11% 6
t/pmc/io.t 5 1280 17 5 29.41% 3-5, 16-17
t/pmc/pmc.t 1 256 87 1 1.15% 85
t/src/manifest.t 1 256 4 1 25.00% 4
t/src/sprintf.t 1 256 3 1 33.33% 3
23 subtests skipped.
Failed 6/53 test scripts, 88.68% okay. 11/830 subtests failed, 98.67% okay.
Thanks,
Jonathan