[svn:parrot] r47560 - in trunk/src: . pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Sat Jun 12 01:14:01 UTC 2010
Author: whiteknight
Date: Sat Jun 12 01:14:00 2010
New Revision: 47560
URL: https://trac.parrot.org/parrot/changeset/47560
Log:
[gc] Gix order-of-destruction bug discovered by Chandon++. The check for aliveness of the scheduler in Parrot_cx_delete_taskwas failing, so in Scheduler.destroy I null out the ->scheduler field of the interpreter to ensure it gets around the segfault here. I don't think gc finalization adds PMCs back onto the free list, so the test there was failing
Modified:
trunk/src/pmc/scheduler.pmc
trunk/src/scheduler.c
Modified: trunk/src/pmc/scheduler.pmc
==============================================================================
--- trunk/src/pmc/scheduler.pmc Fri Jun 11 20:54:21 2010 (r47559)
+++ trunk/src/pmc/scheduler.pmc Sat Jun 12 01:14:00 2010 (r47560)
@@ -251,6 +251,7 @@
*/
VTABLE void destroy() {
Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
+ core_struct->interp->scheduler = NULL;
/* TT #946: this line is causing an order-of-destruction error
because the scheduler is being freed before its tasks.
Commenting this out till we get a real fix (although it's a hack) */
Modified: trunk/src/scheduler.c
==============================================================================
--- trunk/src/scheduler.c Fri Jun 11 20:54:21 2010 (r47559)
+++ trunk/src/scheduler.c Sat Jun 12 01:14:00 2010 (r47560)
@@ -403,7 +403,7 @@
Parrot_cx_delete_task(PARROT_INTERP, ARGIN(PMC *task))
{
ASSERT_ARGS(Parrot_cx_delete_task)
- if (interp->scheduler && !PObj_on_free_list_TEST(interp->scheduler)) {
+ if (interp->scheduler) {
const INTVAL tid = VTABLE_get_integer(interp, task);
VTABLE_delete_keyed_int(interp, interp->scheduler, tid);
}
More information about the parrot-commits
mailing list