From: "Mehmet Yavuz Selim Soyturk" (via RT) <[EMAIL PROTECTED]> Date: Wed, 28 Feb 2007 08:54:19 -0800
# New Ticket Created by "Mehmet Yavuz Selim Soyturk" # Please include the string: [perl #41642] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41642 > That program causes me segfault. I only did get a segfault when: 1) there is a tailcall _method_ 2) the method gets its parameters with :slurpy I don't get any error if I invoke parrot with the -G flag . . . Does the following patch fix it? If so, and this patch does work for me in r17222, then this is the same problem I discovered on 25-Dec-06: From: Bob Rogers <[EMAIL PROTECTED]> Subject: GC problem in parrot_pass_args to a tailcall (r16239) Date: Mon, 25 Dec 2006 15:30:32 -0500 There is a repeatable segfault when GC is triggered during argument passing after a tailcall. The immediate symptom is that clone_key_arg blows cookies because the current arg is a 0xdeadbeef PMC. Apparently, the sweep doesn't see pointers in the old context . . . My test case didn't require a method, but I also couldn't reproduce it reliably without a code tweak to force a GC during arg processing. I still don't know what the "real" fix ought to look like. It wasn't obvious to me at the time . . . and then I got too busy. -- Bob Rogers http://rgrjr.dyndns.org/
Diffs between last version checked in and current workfile(s): Index: src/ops/core.ops =================================================================== --- src/ops/core.ops (revision 17060) +++ src/ops/core.ops (working copy) @@ -538,7 +538,9 @@ interp->current_args = NULL; interp->current_params = NULL; + Parrot_block_DOD(interp); parrot_pass_args(interp, caller_ctx, ctx, src_indexes, dst_indexes, PARROT_PASS_PARAMS); + Parrot_unblock_DOD(interp); if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) { PObj_get_FLAGS(ccont) &= ~SUB_FLAG_TAILCALL; --ctx->recursion_depth; End of diffs.