id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
656	Optimization in src/pmc/RetContinuation.pmc:invoke causes segfault	whiteknight		"After the GC API refactor, there is now a line in src/pmc/retcontinuation.pmc:invoke() that is commented out:

{{{
/* Parrot_gc_free_pmc_header(interp, SELF); */
}}}

Prior to the refactor, this line was replaced by this sequence:

{{{
VTABLE_destroy(interp, SELF);
{
    Arenas            *arena_base = interp->arena_base;
    Small_Object_Pool *pool       = arena_base->pmc_pool;
    Small_Object_Pool *ext_pool   = arena_base->pmc_ext_pool;
    ext_pool->add_free_object(interp, ext_pool,
            (PObj *)SELF->pmc_ext);
    PObj_flags_SETTO((PObj *)SELF, PObj_on_free_list_FLAG);
    pool->add_free_object(interp, pool, (PObj *)SELF);
    pool->num_free_objects++;
}
}}}

As far as I can trace it, the two sequences should perform the same exact sequence of steps in the same order (call the destroy VTABLE, free the pmc_ext, set the on_free_list flag for the pmc, free the pmc, increment the number of items on the free list).

After the refactor, this line of code causes a segfault in t/pmc/packfiledirectory.t, for reasons that I can't figure out. If we can figure out the segfault, we can uncomment this line and get a performance win. (I think chromatic said it was something like 2.25%)."	todo	closed	normal		none	1.1.0	medium	fixed					
