Index: cpu_dep.c
===================================================================
RCS file: /cvs/public/parrot/cpu_dep.c,v
retrieving revision 1.7
diff -u -r1.7 cpu_dep.c
--- cpu_dep.c 1 Jun 2003 00:17:43 -0000 1.7
+++ cpu_dep.c 2 Jul 2003 21:50:53 -0000
@@ -57,6 +57,9 @@
# ifdef HAS_HEADER_SETJMP
Parrot_jump_buff env;
+ /* Zero the Parrot_jump_buff, otherwise you will trace stale objects */
+ memset(&env, 0, sizeof(env));
+
/* this should put registers in env, which then get marked in
* trace_system_stack below
*/
Index: classes/parrotio.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/parrotio.pmc,v
retrieving revision 1.2
diff -u -r1.2 parrotio.pmc
--- classes/parrotio.pmc 1 Jul 2003 15:41:02 -0000 1.2
+++ classes/parrotio.pmc 2 Jul 2003 21:50:53 -0000
@@ -27,7 +27,7 @@
void destroy () {
ParrotIO *io = PMC_data(SELF);
- if (!(io->flags & PIO_F_SHARED))
+ if (io && !(io->flags & PIO_F_SHARED))
PIO_close(interpreter, SELF);
}
}
Index: io/io.c
===================================================================
RCS file: /cvs/public/parrot/io/io.c,v
retrieving revision 1.40
diff -u -r1.40 io.c
--- io/io.c 1 Jul 2003 15:41:06 -0000 1.40
+++ io/io.c 2 Jul 2003 21:50:54 -0000
@@ -91,7 +91,8 @@
}
/*
- * Destroying the IO-Stream, at the moment only free memory
+ * Destroying the IO-Stream, at the moment only free memory and remove
+ * the pointers from the PMC
*/
void
PIO_destroy(theINTERP, PMC *pmc)
@@ -102,6 +103,8 @@
if (io->b.startb && (io->b.flags & PIO_BF_MALLOC))
mem_sys_free(io->b.startb);
mem_sys_free(io);
+ PMC_data(pmc) = NULL;
+ pmc->cache.struct_val = NULL;
}
/*