[perl #60556] Exceptions from C-level MULTI functions break subs
James Keenan via RT
parrotbug-followup at parrotcode.org
Thu Dec 4 03:52:02 UTC 2008
On Sun Nov 16 02:08:01 2008, cotto wrote:
> On Sat Nov 15 11:56:08 2008, christoph at mksig.org wrote:
>
> I added a TODO'd test for this bug to the end of t/pmc/exception.t in
> r32698.
t/pmc/exception.t test #30 just passed for me on Linux/i386 at r33476.
However, it is still failing on Darwin/PPC at r33477.
Darwin:
not ok 30 - catch ex from C-level MULTI function # TODO broken
# Failed (TODO) test 'catch ex from C-level MULTI function'
# at t/pmc/exception.t line 682.
# Exited with error code: [SIGNAL 10]
# Received:
#
# Expected:
# no segfault
#
(gdb) run t/pmc/exception_30.pir
Starting program: parrot t/pmc/exception_30.pir
Reading symbols for shared libraries
.+.+.................................................................++ done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
0x010c4dbc in clone_key_arg (interp=0x3106770, st=0xbfffcc50) at
src/inter_call.c:972
972 if (key->vtable->base_type != enum_class_Key)
(gdb) bt
#0 0x010c4dbc in clone_key_arg (interp=0x3106770, st=0xbfffcc50) at
src/inter_call.c:972
#1 0x010c628c in Parrot_convert_arg (interp=0x3106770, st=0xbfffcc50)
at src/inter_call.c:1585
#2 0x010c5db4 in Parrot_process_args (interp=0x3106770, st=0xbfffcc50,
param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1457
#3 0x010c643c in parrot_pass_args (interp=0x3106770, src_ctx=0x311f280,
dest_ctx=0x31277f0, src_indexes=0x3127eb0, dest_indexes=0x3127edc,
param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1651
#4 0x01010cac in Parrot_get_params_pc (cur_opcode=0x3127edc,
interp=0x3106770) at src/ops/core.ops:601
#5 0x011184d0 in runops_slow_core (interp=0x3106770, pc=0x3127edc) at
src/runops_cores.c:222
#6 0x010cc664 in runops_int (interp=0x3106770, offset=20) at
src/interpreter.c:938
#7 0x010cd28c in runops (interp=0x3106770, offs=20) at src/inter_run.c:103
#8 0x010cd5f4 in runops_args (interp=0x3106770, sub=0x4bcbc0,
obj=0x283c640, meth_unused=0x0, sig=0x145aa10 "vP", ap=0xbfffcf74 "") at
src/inter_run.c:240
#9 0x010cd790 in Parrot_runops_fromc_args (interp=0x3106770,
sub=0x4bcbc0, sig=0x145aa10 "vP") at src/inter_run.c:305
#10 0x010ac1b0 in Parrot_ex_throw_from_c (interp=0x3106770,
exception=0x4bcaa0) at src/exceptions.c:310
#11 0x010ac2b8 in Parrot_ex_throw_from_c_args (interp=0x3106770,
ret_addr=0x0, exitcode=30, format=0x14927a4 "float division by zero") at
src/exceptions.c:377
#12 0x013fa5d4 in Parrot_scalar_multi_divide_PMC_PMC (interp=0x3106770,
pmc=0x4bcbe0, value=0x4bcbe0, dest=0x0) at ./src/pmc/scalar.pmc:444
#13 0x010db864 in pcf_P_JPPP (interp=0x3106770, self=0x2842080) at
src/nci.c:629
#14 0x012d3d04 in Parrot_NCI_invoke (interp=0x3106770, pmc=0x2842080,
next=0x0) at ./src/pmc/nci.pmc:321
#15 0x010c8b5c in Parrot_pcc_invoke_sub_from_sig_object
(interp=0x3106770, sub_obj=0x2842080, sig_obj=0x4bcb80) at
src/inter_call.c:2659
#16 0x010d6510 in Parrot_mmd_multi_dispatch_from_c_args
(interp=0x3106770, name=0x145b57c "divide", sig=0x14695a0 "PPP->P") at
src/multidispatch.c:560
#17 0x0127fce4 in Parrot_default_divide (interp=0x3106770, pmc=0x4bcbe0,
value=0x4bcbe0, dest=0x283c640) at ./src/pmc/default.pmc:1464
#18 0x01030ef0 in Parrot_div_p_p_p (cur_opcode=0x3127e70,
interp=0x3106770) at src/ops/math.ops:528
#19 0x011184d0 in runops_slow_core (interp=0x3106770, pc=0x3127e70) at
src/runops_cores.c:222
#20 0x010cc664 in runops_int (interp=0x3106770, offset=0) at
src/interpreter.c:938
#21 0x010cd28c in runops (interp=0x3106770, offs=0) at src/inter_run.c:103
#22 0x010cd5f4 in runops_args (interp=0x3106770, sub=0x4bd040,
obj=0x283c640, meth_unused=0x0, sig=0x145aa10 "vP", ap=0xbffff5c4 "") at
src/inter_run.c:240
#23 0x010cd790 in Parrot_runops_fromc_args (interp=0x3106770,
sub=0x4bd040, sig=0x145aa10 "vP") at src/inter_run.c:305
#24 0x010a8a74 in Parrot_runcode (interp=0x3106770, argc=1,
argv=0xbffff7dc) at src/embed.c:959
#25 0x014343c8 in imcc_run_pbc (interp=0x3106770, obj_file=0,
output_file=0x0, argc=1, argv=0xbffff7dc) at compilers/imcc/main.c:790
#26 0x01434ecc in imcc_run (interp=0x3106770, sourcefile=0xbffff88b
"t/pmc/exception_30.pir", argc=1, argv=0xbffff7dc) at
compilers/imcc/main.c:1078
#27 0x00002a40 in main (argc=1, argv=0xbffff7dc) at src/main.c:61
More information about the parrot-dev
mailing list