Author: leo
Date: Tue Nov 8 01:48:34 2005
New Revision: 9836
Modified:
trunk/classes/continuation.pmc
trunk/classes/retcontinuation.pmc
trunk/src/stacks.c
Log:
#37617 (GC bugs, tickled by partcl) finally fixed
Modified: trunk/classes/continuation.pmc
==============================================================================
--- trunk/classes/continuation.pmc (original)
+++ trunk/classes/continuation.pmc Tue Nov 8 01:48:34 2005
@@ -85,7 +85,8 @@ Marks the continuation as live.
void mark () {
struct Parrot_cont * cc = PMC_cont(SELF);
- mark_context(INTERP, cc->to_ctx);
+ if (cc->to_ctx)
+ mark_context(INTERP, cc->to_ctx);
}
/*
Modified: trunk/classes/retcontinuation.pmc
==============================================================================
--- trunk/classes/retcontinuation.pmc (original)
+++ trunk/classes/retcontinuation.pmc Tue Nov 8 01:48:34 2005
@@ -138,6 +138,11 @@ the frame pointer in the stack frame cac
}
Parrot_free_context(INTERP, cc->from_ctx, 1);
cc->from_ctx = NULL;
+ /*
+ * the to_ctx is marked in Continuation.mark
+ * NULLify it or turn off the custom_mark bit
+ */
+ cc->to_ctx = NULL;
INTERP->current_args = NULL;
/* no address and no segment */
if (!cc->seg) {
Modified: trunk/src/stacks.c
==============================================================================
--- trunk/src/stacks.c (original)
+++ trunk/src/stacks.c Tue Nov 8 01:48:34 2005
@@ -343,13 +343,6 @@ stack_pop(Interp *interpreter, Stack_Chu
break;
}
- /*
- * Invalidate stack entry. It seems that due to reusage (after GC)
- * there can be stale entries on the stack. At least
- * t/library/pge_4 failes without this hack
- * TODO investigate further what's goin' on.
- */
- entry->entry_type = NO_STACK_ENTRY_TYPE;
return where;
}