Am Dienstag, 5. Dezember 2006 22:07 schrieb Matt Diephouse:
> Constant PMCs are marked, but are constant STRINGs?

As STRINGs aren't pointing to other items, there's no extra code to deal with 
constant strings. They are marked, when refered to from other locations or 
maybe not. This is ok, as the constant string pool isn't swept.

> > If above assert triggers, then some item are created in the wrong pool
> > and then stored as constants.
> >
> > To track that further down, it'll be helpful to have some information
> > about the origin & contents of the GC-ed constant, but typically such
> > creation code is in imcc or packfile.
>
> I'm on my laptop atm and it's not exhibiting the error, but the
> constant in question was in a method call:
>
>     $P0.'method'('string constant that was getting collected', ...)

The relevant code dealing with such constants is in pbc.c:add_const_str() or 
more specifically in IMCC_string_from_reg(), which is creating STRINGs with 
PObj_constant_FLAG set in all code paths AFAICS.

You could place an assert into the former function to verify that this flag is 
set.

There must be some additional nastiness to trigger that GC bug.

leo

Reply via email to