[svn:parrot] r40881 - branches/pluggable_runcore/src/runcore
cotto at svn.parrot.org
cotto at svn.parrot.org
Sun Aug 30 20:45:40 UTC 2009
Author: cotto
Date: Sun Aug 30 20:45:39 2009
New Revision: 40881
URL: https://trac.parrot.org/parrot/changeset/40881
Log:
[profile] mark the runcore->profile_filename STRING during each runloop iteration.
This is stupid and bad and wrong, but the GC doesn't catch it by default and
apparently marking it when a runloop starts isn't always sufficient.
Modified:
branches/pluggable_runcore/src/runcore/cores.c
Modified: branches/pluggable_runcore/src/runcore/cores.c
==============================================================================
--- branches/pluggable_runcore/src/runcore/cores.c Sun Aug 30 20:38:59 2009 (r40880)
+++ branches/pluggable_runcore/src/runcore/cores.c Sun Aug 30 20:45:39 2009 (r40881)
@@ -1090,10 +1090,6 @@
STRING *unknown_file = CONST_STRING(interp, "<unknown file>");
runcore->runcore_start = Parrot_hires_get_time();
- /* profile_filename appears to get prematurely recycled if it's not marked.
- * Manually marking it or adding an unused STRING variable that points at
- * it keeps it from an untimely demise. */
- Parrot_gc_mark_PObj_alive(interp, (PObj*)runcore->profile_filename);
/* if we're in a nested runloop, */
if (runcore->level != 0) {
@@ -1143,6 +1139,11 @@
"attempt to access code outside of current code segment");
}
+ /* HACK: profile_filename appears to get prematurely recycled if it's
+ * not marked. Manually marking it or adding an unused STRING variable
+ * that points at it keeps it from an untimely demise. */
+ Parrot_gc_mark_PObj_alive(interp, (PObj*)runcore->profile_filename);
+
/* avoid an extra call to Parrot_Context_get_info */
mem_sys_memcopy(&preop_info, &postop_info, sizeof (Parrot_Context_info));
More information about the parrot-commits
mailing list