On Fri Oct 17 16:10:40 2008, mgrimes wrote:
> The following code results in a segfault:
> 
> .sub main :main
>     .include 'include/test_more.pir'
> 
>     new P0, 'Integer'
>     new P2, 'Integer'
>     new P1, 'Integer'
> 
>     set P0, 1
>     set P2, 0
> 
>     ok( 1, 'ready...' )
> 
>     push_eh handler
>         P1 = P0 / P2
>         ok( 0, "not caught" )
>         end
>     pop_eh
> handler:
>     ok( 1, 'caught' )       # segfaults
>     # say "ok"              # no problem with this
> .end
> 
> The ok() line will segfault, but if it is replaced by the "say" line,
> all is well. If we use I0, I1, I2 instead of the Integer PMC's, it
> works find, as well.
> 
> Thanks,
> Mark

I can duplicate this in r33359 on feather (first changing the P0's to $P0's); 
Here's a bt.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6abb8d0 (LWP 20767)]
0xb7b7736b in clone_key_arg (interp=0x804f040, st=0xbffe493c) at 
src/inter_call.c:972
972         if (key->vtable->base_type != enum_class_Key)
(gdb) bt
#0  0xb7b7736b in clone_key_arg (interp=0x804f040, st=0xbffe493c) at 
src/inter_call.c:972
#1  0xb7b783c6 in Parrot_convert_arg (interp=0x804f040, st=0xbffe493c) at 
src/inter_call.c:1585
#2  0xb7b77f5d in Parrot_process_args (interp=0x804f040, st=0xbffe493c, 
param_or_result=PARROT_PASS_PARAMS)
    at src/inter_call.c:1457
#3  0xb7b7854e in parrot_pass_args (interp=0x804f040, src_ctx=0x8131e00, 
dest_ctx=0x818b5b8, src_indexes=0x8130220, 
    dest_indexes=0xb797c1fc, param_or_result=PARROT_PASS_PARAMS) at 
src/inter_call.c:1651
#4  0xb7af59cc in Parrot_get_params_pc (cur_opcode=0xb797c1fc, 
interp=0x804f040) at 
src/ops/core.ops:601
#5  0xb7bac4bc in runops_slow_core (interp=0x804f040, pc=0xb797c1fc) at 
src/runops_cores.c:222
#6  0xb7b7d019 in runops_int (interp=0x804f040, offset=66) at 
src/interpreter.c:938
#7  0xb7b7d8f3 in runops (interp=0x804f040, offs=66) at src/inter_run.c:103
#8  0xb7b7dbb1 in runops_args (interp=0x804f040, sub=0x8143124, obj=0x80b6f98, 
meth_unused=0x0, sig=0xb7e79f60 "vP", 
    ap=0xbffe4b48 "(0\024\b\001") at src/inter_run.c:240
#9  0xb7b7dcec in Parrot_runops_fromc_args (interp=0x804f040, sub=0x8143124, 
sig=0xb7e79f60 "vP") at src/inter_run.c:305
#10 0xb7b66037 in Parrot_ex_throw_from_c (interp=0x804f040, 
exception=0x8143028) at 
src/exceptions.c:310
#11 0xb7b660fd in Parrot_ex_throw_from_c_args (interp=0x804f040, ret_addr=0x0, 
exitcode=30, 
    format=0xb7ea706c "float division by zero") at src/exceptions.c:377
#12 0xb7d32556 in Parrot_Integer_multi_divide_DEFAULT_PMC (interp=0x804f040, 
pmc=0x814403c, value=0x8144020, dest=0x8144004)
    at ./src/pmc/integer.pmc:754
#13 0x080d60a1 in ?? ()
#14 0x0804f040 in ?? ()
#15 0x0814403c in ?? ()
#16 0x08144020 in ?? ()
#17 0x08144004 in ?? ()
#18 0x00000200 in ?? ()
#19 0xbffe5d08 in ?? ()
#20 0x080f6e14 in ?? ()
#21 0x08180a10 in ?? ()
#22 0x00000001 in ?? ()
#23 0x00000003 in ?? ()
#24 0x00000003 in ?? ()
#25 0x00000002 in ?? ()
#26 0x00000000 in ?? ()


-- 
Will "Coke" Coleda
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to