Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

objects.t failures

1 view
Skip to first unread message

Simon Glover

unread,
Jul 23, 2003, 1:45:15 PM7/23/03
to perl6-i...@perl.org

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;

Dan Sugalski

unread,
Jul 23, 2003, 2:04:24 PM7/23/03
to Simon Glover, perl6-i...@perl.org
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)
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Simon Glover

unread,
Jul 23, 2003, 2:10:06 PM7/23/03
to Dan Sugalski, perl6-i...@perl.org

On Wed, 23 Jul 2003, Dan Sugalski wrote:

> 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

Lars Balker Rasmussen

unread,
Jul 23, 2003, 2:39:42 PM7/23/03
to perl6-i...@perl.org
Simon Glover <sc...@amnh.org> writes:
> OK, I've committed it.

I'll just confirm that FreeBSD/x86 now passes objects.t.
--
Lars Balker Rasmussen Consult::Perl

Jonathan Worthington

unread,
Jul 23, 2003, 4:20:01 PM7/23/03
to perl6-i...@perl.org, Lars Balker Rasmussen
> Simon Glover <sc...@amnh.org> writes:
> > OK, I've committed it.
>
> I'll just confirm that FreeBSD/x86 now passes objects.t.
And so does Win32. Latest nmake test output:-

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

0 new messages