[svn:parrot] r41796 - trunk/src/call

jonathan at svn.parrot.org jonathan at svn.parrot.org
Sat Oct 10 16:02:20 UTC 2009


Author: jonathan
Date: Sat Oct 10 16:02:18 2009
New Revision: 41796
URL: https://trac.parrot.org/parrot/changeset/41796

Log:
[core] Be sure we don't leave ctx->current_sub uninitialized. While it *usually* will be init'd shortly after context creation, there's no promise of that, and this uninitialized pointer was being hit and followed during a GC run, causing an assertion failure and/or segfault.

Modified:
   trunk/src/call/context.c

Modified: trunk/src/call/context.c
==============================================================================
--- trunk/src/call/context.c	Sat Oct 10 15:25:53 2009	(r41795)
+++ trunk/src/call/context.c	Sat Oct 10 16:02:18 2009	(r41796)
@@ -1159,6 +1159,7 @@
     ctx->handlers          = PMCNULL;
     ctx->caller_ctx        = NULL;
     ctx->pred_offset       = 0;
+    ctx->current_sub       = PMCNULL;
 
     if (old) {
         /* some items should better be COW copied */


More information about the parrot-commits mailing list