Author: leo
Date: Tue Nov 8 12:50:37 2005
New Revision: 9850
Modified:
trunk/classes/eval.pmc
trunk/classes/sub.pmc
Log:
attack double destroy bug of evaled subroutines
Modified: trunk/classes/eval.pmc
==============================================================================
--- trunk/classes/eval.pmc (original)
+++ trunk/classes/eval.pmc Tue Nov 8 12:50:37 2005
@@ -44,7 +44,7 @@ clear_fixups(Interp* interpreter, PMC* s
case enum_fixup_sub:
ci = ft->fixups[i]->offset;
sub = ct->constants[ci]->u.key;
- VTABLE_destroy(interpreter, sub);
+ PMC_sub(sub)->seg = NULL;
ct->constants[ci]->u.key = NULL;
ft->fixups[i]->type = 0;
}
Modified: trunk/classes/sub.pmc
==============================================================================
--- trunk/classes/sub.pmc (original)
+++ trunk/classes/sub.pmc Tue Nov 8 12:50:37 2005
@@ -32,6 +32,8 @@ clear_fixup(Interp* interpreter, PMC* se
struct PackFile_ConstTable *ct;
seg = PMC_sub(self)->seg;
+ if (!seg)
+ return;
ft = seg->fixups;
if (!ft)
return;