[svn:parrot] r40824 - trunk/src/ops
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Thu Aug 27 07:43:02 UTC 2009
Author: NotFound
Date: Thu Aug 27 07:42:54 2009
New Revision: 40824
URL: https://trac.parrot.org/parrot/changeset/40824
Log:
[ops] fix copy opcode. Should fix all recent double-free errors
Modified:
trunk/src/ops/set.ops
Modified: trunk/src/ops/set.ops
==============================================================================
--- trunk/src/ops/set.ops Thu Aug 27 06:29:58 2009 (r40823)
+++ trunk/src/ops/set.ops Thu Aug 27 07:42:54 2009 (r40824)
@@ -500,8 +500,7 @@
PMC * const meta = VTABLE_getprops(interp, $1);
/* avoid leaks and unreachable memory by destroying the destination PMC */
- if (PObj_active_destroy_TEST($1))
- VTABLE_destroy(interp, $1);
+ Parrot_pmc_destroy(interp, $1);
/* the source PMC knows how to clone itself, but we must reuse the
* destination header */
@@ -509,6 +508,7 @@
/* don't let the clone's destruction destroy the destination's data */
PObj_active_destroy_CLEAR(clone);
+ PMC_data(clone) = NULL;
PMC_metadata(clone) = NULL;
PMC_next_for_GC(clone) = NULL;
PMC_sync(clone) = NULL;
More information about the parrot-commits
mailing list