#1129: segfault in clone_key_arg (due to pcc refactor)
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: none | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
using parrot and partcl latest, partcl fails t/cmd_for.t as
{{{Parrot_run_meth_fromc_args_reti}}} has been removed. chromatic++
suggested that {{{Parrot_call_method_ret_int}}} is the replacement (from
src/extend.c)
Applying this patch to partcl:
{{{
diff --git a/src/pmc/tclstring.pmc b/src/pmc/tclstring.pmc
index 4f73589..abe989d 100644
--- a/src/pmc/tclstring.pmc
+++ b/src/pmc/tclstring.pmc
@@ -43,7 +43,7 @@ pmclass TclString
PMC * const method =
Parrot_oo_find_vtable_override_for_class(interp, _
class, get_bool);
if (!PMC_IS_NULL(method)) {
- return (INTVAL)Parrot_run_meth_fromc_args_reti(interp,
method, SELF
, get_bool, "I");
+ return Parrot_call_method_ret_int(interp, method, SELF,
get_bool, "
->I");
} else {
return -9999; // This should never happen.
}
}}}
parrot instead segfaults in clone_key_arg with the following backtrace:
{{{
#0 0x00007fcfa5c3d10c in clone_key_arg (interp=0x165e010, key=0x167ef60)
at src/call/args.c:2724
#1 0x00007fcfa5c3d508 in Parrot_pcc_build_sig_object_from_varargs (
interp=0x165e010, obj=0x177c8b8, sig=0x18e0cd0 "Pi->I",
args=0x7fffae2055f0) at src/call/args.c:914
#2 0x00007fcfa5c2cd5a in Parrot_call_method_ret_int (interp=0x165e010,
sub_pmc=0x177dc90, obj=0x177c8b8, method=<value optimized out>,
signature=0x7fcfa3406ffc "->I") at src/extend.c:1320
#3 0x00007fcfa5beafa3 in Parrot_unless_p_ic (cur_opcode=0x7fcfa60c5c80,
interp=0x165e010) at src/ops/core.ops:373
#4 0x00007fcfa5c672a0 in runops_fast_core (interp=0x165e010,
runcore=<value optimized out>, pc=0x7fcfa60c5c80)
at src/runcore/cores.c:665
#5 0x00007fcfa5c665f1 in runops_int (interp=0x165e010, offset=0)
at src/runcore/main.c:545
#6 0x00007fcfa5c3f5f1 in runops (interp=0x165e010, offs=<value optimized
out>)
at src/call/ops.c:97
#7 0x00007fcfa5c39bcb in Parrot_pcc_invoke_from_sig_object
(interp=0x165e010,
sub_obj=<value optimized out>, call_object=<value optimized out>)
at src/call/pcc.c:243
#8 0x00007fcfa5c39ca4 in Parrot_pcc_invoke_sub_from_c_args
(interp=0x165e010,
sub_obj=0x177a158, sig=<value optimized out>) at src/call/pcc.c:66
#9 0x0000000000400d2b in main (argc=2, argv=0x7fffae2059e8) at tcl.c:444
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1129>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets