Author: jonathan
Date: Sat Mar 31 05:14:28 2007
New Revision: 17883

Modified:
   trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
   trunk/src/inter_call.c

Log:
Fix to set from_ctx in continuations in PCCMETHOD, PCCINVOKE and 
Parrot_PCCINVOKE. Resolves the segfault reported in RT #42229.

Modified: trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm (original)
+++ trunk/lib/Parrot/Pmc2c/PCCMETHOD.pm Sat Mar 31 05:14:28 2007
@@ -380,6 +380,7 @@
     PMC* ccont = caller_ctx->current_cont;
 
     ctx->current_cont = ret_cont;
+    PMC_cont(ret_cont)->from_ctx = ctx;
 
     current_args = interp->current_args;
     interp->current_args = NULL;
@@ -518,6 +519,7 @@
       interp->current_object = $invocant;
       interp->current_cont = NEED_CONTINUATION;
       ctx->current_cont = ret_cont;
+      PMC_cont(ret_cont)->from_ctx = ctx;
       pccinvoke_meth = VTABLE_find_method(interp, $invocant, $method_name);
       if (!pccinvoke_meth) {
           real_exception(interp, NULL, METH_NOT_FOUND, "Method '%Ss' not 
found", $method_name);

Modified: trunk/src/inter_call.c
==============================================================================
--- trunk/src/inter_call.c      (original)
+++ trunk/src/inter_call.c      Sat Mar 31 05:14:28 2007
@@ -1493,6 +1493,7 @@
     interp->current_object = pmc;
     interp->current_cont = NEED_CONTINUATION;
     ctx->current_cont = ret_cont;
+    PMC_cont(ret_cont)->from_ctx = ctx;
     pccinvoke_meth = VTABLE_find_method(interp, pmc, method_name);
     if (!pccinvoke_meth) {
         real_exception(interp, NULL, METH_NOT_FOUND, "Method '%Ss' not found", 
method_name);

Reply via email to