Front page | perl.perl6.compiler |
Postings from July 2008
[perl #56618] [BUG] rakudo segfaults calling subs in a namespace
Thread Next
From:
Jeff Horwitz
Date:
July 5, 2008 12:29
Subject:
[perl #56618] [BUG] rakudo segfaults calling subs in a namespace
# New Ticket Created by Jeff Horwitz
# Please include the string: [perl #56618]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56618 >
In r29081, the following code segfaults:
module Foo::Bar;
sub foo() { say "bar"; }
foo(); # segfaults here
The script works if the modules declaration is omitted. I also tried
running with -G, and it still segfaults at the same place. pmichaud was
able to reproduce as well.
Backtrace follows:
#0 0x402cc6df in Parrot_Closure_invoke (interp=0x804f048, pmc=0x4161e700,
in_next=0x868e23c) at closure.pmc:103
103 else if ((PObj_get_FLAGS(outer_sub) & SUB_FLAG_IS_OUTER)
&&
(gdb) bt
#0 0x402cc6df in Parrot_Closure_invoke (interp=0x804f048, pmc=0x4161e700,
in_next=0x868e23c) at closure.pmc:103
#1 0x400f32d6 in Parrot_invokecc_p (cur_opcode=0x868e234,
interp=0x804f048)
at core.ops:413
#2 0x40196274 in runops_slow_core (interp=0x804f048, pc=0x868e234)
at src/runops_cores.c:221
#3 0x40168c26 in runops_int (interp=0x804f048, offset=17)
at src/interpreter.c:918
#4 0x40169525 in runops (interp=0x804f048, offs=17) at
src/inter_run.c:106
#5 0x401697aa in runops_args (interp=0x804f048, sub=0x4161e754,
obj=0x8099da8, meth_unused=0x0, sig=0x403c5814 "P",
ap=0xbffff7bc "\005\025@\001") at src/inter_run.c:232
#6 0x401698ec in Parrot_runops_fromc_args (interp=0x804f048,
sub=0x4161e754,
sig=0x403c5814 "P") at src/inter_run.c:301
#7 0x4018b8c5 in run_sub (interp=0x804f048, sub_pmc=0x4161e754)
at src/packfile.c:493
#8 0x4018bb0c in do_1_sub_pragma (interp=0x804f048, sub_pmc=0x4161e754,
action=PBC_MAIN) at src/packfile.c:585
#9 0x4018bda6 in do_sub_pragmas (interp=0x804f048, self=0x87c4938,
action=PBC_MAIN, eval_pmc=0x4161e540) at src/packfile.c:719
#10 0x401903c5 in PackFile_fixup_subs (interp=0x804f048, what=PBC_MAIN,
eval=0x4161e540) at src/packfile.c:3800
#11 0x403aeea0 in imcc_compile (interp=0x804f048,
s=0x87c4508 "\n.namespace \n.sub \"_block11\" :lexid(\"21\")\n new
$P12, \"Perl6Scalar\"\n .lex \"$_\", $P12\n new $P13,
\"Perl6Scalar\"\n .lex \"$!\", $P13\n new $P14, \"Perl6Scalar\"\n
.lex \"$/\", $P14\n get_hll_g"..., pasm_file=0,
error_message=0xbffff94c)
at compilers/imcc/parser_util.c:920
#12 0x403af143 in imcc_compile_pir_ex (interp=0x804f048,
s=0x87c4508 "\n.namespace \n.sub \"_block11\" :lexid(\"21\")\n new
$P12, \"Perl6Scalar\"\n .lex \"$_\", $P12\n new $P13,
\"Perl6Scalar\"\n .lex \"$!\", $P13\n new $P14, \"Perl6Scalar\"\n
.lex \"$/\", $P14\n get_hll_g"...)
atcompilers/imcc/parser_util.c:1086
#13 0x4017261d in pcf_P_Jt (interp=0x804f048, self=0x82238e8) at
src/nci.c:234
#14 0x402d6c9e in Parrot_NCI_invoke (interp=0x804f048, pmc=0x82238e8,
next=0x412c8ce8) at nci.pmc:203
#15 0x400f32d6 in Parrot_invokecc_p (cur_opcode=0x412c8ce0, interp=0x804f048)
at core.ops:413
#16 0x40196274 in runops_slow_core (interp=0x804f048, pc=0x412c8ce0)
at src/runops_cores.c:221
#17 0x40168c26 in runops_int (interp=0x804f048, offset=3280)
at src/interpreter.c:918
#18 0x40169525 in runops (interp=0x804f048, offs=13293) at
src/inter_run.c:106
#19 0x401697aa in runops_args (interp=0x804f048, sub=0x8354d00,
obj=0x8099da8,
meth_unused=0x0, sig=0x403c1d47 "vP", ap=0xbffffbbc "P\035A\220")
at src/inter_run.c:232
#20 0x401698ec in Parrot_runops_fromc_args (interp=0x804f048,
sub=0x8354d00,
sig=0x403c1d47 "vP") at src/inter_run.c:301
#21 0x40152507 in Parrot_runcode (interp=0x804f048, argc=2,
argv=0xbffffd1c)
at src/embed.c:950
#22 0x4039d334 in imcc_run_pbc (interp=0x804f048, obj_file=0,
output_file=0x0,
argc=2, argv=0xbffffd1c) at compilers/imcc/main.c:782
#23 0x4039dde2 in imcc_run (interp=0x804f048,
sourcefile=0xbffffe20 "perl6.pbc", argc=2, argv=0xbffffd1c)
at compilers/imcc/main.c:1070
#24 0x080488d8 in main (argc=2, argv=0xbffffd1c) at src/main.c:61
Thread Next
-
[perl #56618] [BUG] rakudo segfaults calling subs in a namespace
by Jeff Horwitz