[perl #60172] segfault in expand_pcc_sub_call

Will Coleda via RT parrotbug-followup at parrotcode.org
Sun Nov 30 06:48:57 UTC 2008


On Mon Oct 27 10:02:12 2008, coke wrote:
> .sub _main
>   ($S0) = 'blah'(:pir_only=>1)
> .end
> 
> segfaults with:
> 
> 0xb7e4fe84 in expand_pcc_sub_call (interp=0x804f040, unit=0x8116688,
>     ins=0x8120318) at compilers/imcc/pcc.c:706
> 706             if (!meth_call && (the_sub->type & VTADDRESS)) {
> (gdb) bt
> #0  0xb7e4fe84 in expand_pcc_sub_call (interp=0x804f040,
> unit=0x8116688,
>     ins=0x8120318) at compilers/imcc/pcc.c:706
> #1  0xb7e40a93 in find_basic_blocks (interp=0x804f040, unit=0x8116688,
> first=1)
>     at compilers/imcc/cfg.c:261
> 

This behaves a little differently in r33359. Here's the output:

error:imcc:syntax error, unexpected $undefined, expecting COMMA or ')' (':')
        in file 'foo.pir' line 2
Segmentation fault

And here's the bt

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6b1a8d0 (LWP 20922)]
0xb7ec6e77 in expand_pcc_sub_call (interp=0x804f040, unit=0x8123f58, ins=0x812d9d8) 
at compilers/imcc/pcc.c:724
724             if (!meth_call && (the_sub->type & VTADDRESS)) {
(gdb) bt
#0  0xb7ec6e77 in expand_pcc_sub_call (interp=0x804f040, unit=0x8123f58, 
ins=0x812d9d8) at compilers/imcc/pcc.c:724
#1  0xb7eb7683 in find_basic_blocks (interp=0x804f040, unit=0x8123f58, first=1) at 
compilers/imcc/cfg.c:261
#2  0xb7eb9ae5 in imc_reg_alloc (interp=0x804f040, unit=0x8123f58) at 
compilers/imcc/reg_alloc.c:305
#3  0xb7eb1e20 in imc_compile_unit (interp=0x804f040, unit=0x8123f58) at 
compilers/imcc/imc.c:116
#4  0xb7eb1fca in imc_close_unit (interp=0x804f040, unit=0x8123f58) at 
compilers/imcc/imc.c:220
#5  0xb7ea6747 in yyparse (yyscanner=0x811f930, interp=0x804f040) at 
compilers/imcc/imcc.y:795
#6  0xb7eb3abc in compile_to_bytecode (interp=0x804f040, sourcefile=0xbfadd9f4 
"foo.pir", output_file=0x0)
    at compilers/imcc/main.c:950
#7  0xb7eb3ea2 in imcc_run (interp=0x804f040, sourcefile=0xbfadd9f4 "foo.pir", argc=1, 
argv=0xbfadbbb8)
    at compilers/imcc/main.c:1053
#8  0x080489a8 in main (argc=1, argv=0xbfadbbb8) at src/main.c:61


-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list