[perl #60556] Exceptions from C-level MULTI functions break subs

James E Keenan jkeen at verizon.net
Wed Dec 10 04:04:24 UTC 2008


James Keenan via RT wrote:
> 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.


And it continues to fail on Darwin/PPC at r33739.

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: /work/parrot/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
0x010c180c in clone_key_arg (interp=0x2606770, st=0xbfffcc50) at 
src/inter_call.c:972
972         if (key->vtable->base_type != enum_class_Key)
(gdb) bt
#0  0x010c180c in clone_key_arg (interp=0x2606770, st=0xbfffcc50) at 
src/inter_call.c:972
#1  0x010c2cdc in Parrot_convert_arg (interp=0x2606770, st=0xbfffcc50) 
at src/inter_call.c:1585
#2  0x010c2804 in Parrot_process_args (interp=0x2606770, st=0xbfffcc50, 
param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1457
#3  0x010c2e8c in parrot_pass_args (interp=0x2606770, src_ctx=0x261ef40, 
dest_ctx=0x26271f0, src_indexes=0x26278b0, dest_indexes=0x26278dc, 
param_or_result=PARROT_PASS_PARAMS) at src/inter_call.c:1651
#4  0x01010d2c in Parrot_get_params_pc (cur_opcode=0x26278dc, 
interp=0x2606770) at src/ops/core.ops:601
#5  0x011150f0 in runops_slow_core (interp=0x2606770, pc=0x26278dc) at 
src/runops_cores.c:222
#6  0x010c9094 in runops_int (interp=0x2606770, offset=20) at 
src/interpreter.c:938
#7  0x010c9cbc in runops (interp=0x2606770, offs=20) at src/inter_run.c:103
#8  0x010ca024 in runops_args (interp=0x2606770, sub=0x4bcca0, 
obj=0x283be40, meth_unused=0x0, sig=0x1448540 "vP", ap=0xbfffcf74 "") at 
src/inter_run.c:240
#9  0x010ca1c0 in Parrot_runops_fromc_args (interp=0x2606770, 
sub=0x4bcca0, sig=0x1448540 "vP") at src/inter_run.c:305
#10 0x010a8990 in Parrot_ex_throw_from_c (interp=0x2606770, 
exception=0x4bcb80) at src/exceptions.c:311
#11 0x010a8a98 in Parrot_ex_throw_from_c_args (interp=0x2606770, 
ret_addr=0x0, exitcode=30, format=0x147e398 "float division by zero") at 
src/exceptions.c:378
#12 0x013e87e4 in Parrot_scalar_multi_divide_PMC_PMC (interp=0x2606770, 
pmc=0x4bccc0, value=0x4bccc0, dest=0x0) at ./src/pmc/scalar.pmc:444
#13 0x010d7fc4 in pcf_P_JPPP (interp=0x2606770, self=0x28418a0) at 
src/nci.c:629
#14 0x012bfc34 in Parrot_NCI_invoke (interp=0x2606770, pmc=0x28418a0, 
next=0x0) at ./src/pmc/nci.pmc:321
#15 0x010c55ac in Parrot_pcc_invoke_sub_from_sig_object 
(interp=0x2606770, sub_obj=0x28418a0, sig_obj=0x4bcc60) at 
src/inter_call.c:2659
#16 0x010d2c70 in Parrot_mmd_multi_dispatch_from_c_args 
(interp=0x2606770, name=0x14490bc "divide", sig=0x1456b00 "PPP->P") at 
src/multidispatch.c:507
#17 0x01270704 in Parrot_default_divide (interp=0x2606770, pmc=0x4bccc0, 
value=0x4bccc0, dest=0x283be40) at ./src/pmc/default.pmc:1464
#18 0x0102ef90 in Parrot_div_p_p_p (cur_opcode=0x2627870, 
interp=0x2606770) at src/ops/math.ops:528
#19 0x011150f0 in runops_slow_core (interp=0x2606770, pc=0x2627870) at 
src/runops_cores.c:222
#20 0x010c9094 in runops_int (interp=0x2606770, offset=0) at 
src/interpreter.c:938
#21 0x010c9cbc in runops (interp=0x2606770, offs=0) at src/inter_run.c:103
#22 0x010ca024 in runops_args (interp=0x2606770, sub=0x4bd120, 
obj=0x283be40, meth_unused=0x0, sig=0x1448540 "vP", ap=0xbffff5c4 "") at 
src/inter_run.c:240
#23 0x010ca1c0 in Parrot_runops_fromc_args (interp=0x2606770, 
sub=0x4bd120, sig=0x1448540 "vP") at src/inter_run.c:305
#24 0x010a5254 in Parrot_runcode (interp=0x2606770, argc=1, 
argv=0xbffff7dc) at src/embed.c:959
#25 0x01422448 in imcc_run_pbc (interp=0x2606770, obj_file=0, 
output_file=0x0, argc=1, argv=0xbffff7dc) at compilers/imcc/main.c:790
#26 0x01422f4c in imcc_run (interp=0x2606770, sourcefile=0xbffff88b 
"t/pmc/exception_30.pir", argc=1, argv=0xbffff7dc) at 
compilers/imcc/main.c:1078
#27 0x00002a60 in main (argc=1, argv=0xbffff7dc) at src/main.c:61



More information about the parrot-dev mailing list