# New Ticket Created by Christian Bartolomaeus
# Please include the string: [perl #124255]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=124255 >
While trying to silence warnings from tests which use eval_lives_ok, I stumbled
upon a segfault with rakudo.moar. The golfed version is:
$ perl6-m -e 'next; CONTROL { }'
Segmentation fault
I tried to generate a gdb backtrace:
$ cat control.p6
next;
CONTROL {};
$ gdb --args
/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/bin/moar
--execname="$0"
--libpath="/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/share/nqp/lib"
--libpath="."
/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/perl6.moarvm
control.p6
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/bin/moar...done.
(gdb) run
Starting program:
/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/bin/moar
--execname=-bash
--libpath=/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/share/nqp/lib
--libpath=.
/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/perl6.moarvm
control.p6
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
MVM_string_flatten (tc=0x6026c0, s=0x0) at src/strings/ops.c:1018
1018 switch (s->body.storage_type) {
(gdb) bt full
#0 MVM_string_flatten (tc=0x6026c0, s=0x0) at src/strings/ops.c:1018
No locals.
#1 0x00007ffff79478b6 in MVM_interp_run (tc=0x6026c0,
initial_invoke=0x2cbcc60, invoke_data=0x6)
at src/core/interp.c:1561
op = 6
LABELS = {0x7ffff7944e81, 0x7ffff7955569, 0x7ffff7944efa,
0x7ffff7944efa, 0x7ffff794b4c1,
0x7ffff794b504, 0x7ffff795556e, 0x7ffff7955429, 0x7ffff7953b6d,
0x7ffff7954b0f, 0x7ffff7954b14,
0x7ffff794a3c6, 0x7ffff794a3cb, 0x7ffff794a3d0, 0x7ffff794a3d5,
0x7ffff794a36d, 0x7ffff79557f8,
0x7ffff79557fd, 0x7ffff7955802, 0x7ffff7953ca0, 0x7ffff79562fb,
0x7ffff7944eb2, 0x7ffff7944eb8,
0x7ffff7953fbd, 0x7ffff7954011, 0x7ffff7954157, 0x7ffff795407c,
0x7ffff79540ed, 0x7ffff794a3e5,
0x7ffff794a45d, 0x7ffff7954a1d, 0x7ffff7954a8d, 0x7ffff79541bb,
0x7ffff795422d, 0x7ffff794dd90,
0x7ffff7952178, 0x7ffff79521f7, 0x7ffff7956300, 0x7ffff795628f,
0x7ffff7955851, 0x7ffff79558bb,
0x7ffff7955936, 0x7ffff79555ff, 0x7ffff7955670, 0x7ffff79556df,
0x7ffff7944f9e, 0x7ffff7944f9e,
0x7ffff794e519, 0x7ffff794e578, 0x7ffff794de60, 0x7ffff794f59a,
0x7ffff794b6da, 0x7ffff794b73d,
0x7ffff794b51a, 0x7ffff794b57d, 0x7ffff79555b3, 0x7ffff794b1b3,
0x7ffff794b2af, 0x7ffff794b207,
0x7ffff794b25b, 0x7ffff794b303, 0x7ffff794b357, 0x7ffff794e6f2,
0x7ffff795547b, 0x7ffff79554ca,
0x7ffff7955519, 0x7ffff79542a2, 0x7ffff7955a59, 0x7ffff79559a5,
0x7ffff7955a07, 0x7ffff7955807,
0x7ffff794a820, 0x7ffff794a874, 0x7ffff794a8b4, 0x7ffff794a8f4,
0x7ffff794a934, 0x7ffff794e10b,
0x7ffff794eba9, 0x7ffff794d671, 0x7ffff794e371, 0x7ffff794e2cd,
0x7ffff794e31f, 0x7ffff794e15a,
0x7ffff794eb0e, 0x7ffff7946eea, 0x7ffff7946f74, 0x7ffff794b3ab,
0x7ffff794b40d, 0x7ffff794b46b,
0x7ffff794d050, 0x7ffff794d0a6, 0x7ffff794d0fd, 0x7ffff794e9e4,
0x7ffff794af35, 0x7ffff794af87,
0x7ffff794afd9, 0x7ffff794b02b, 0x7ffff794b07d, 0x7ffff794b10b,
0x7ffff794b15c, 0x7ffff794e1d0,
0x7ffff794f61f, 0x7ffff794f66e, 0x7ffff79472e8, 0x7ffff7947337,
0x7ffff7947388, 0x7ffff79473d7,
0x7ffff7947428, 0x7ffff7947477, 0x7ffff79474c6, 0x7ffff7947520,
0x7ffff794757b, 0x7ffff79475d4,
0x7ffff7947625, 0x7ffff7946de8, 0x7ffff7946e37, 0x7ffff7946e94,
0x7ffff7948f9a, 0x7ffff794955d,
0x7ffff794de16, 0x7ffff794eb5c, 0x7ffff794e3bb, 0x7ffff794e412,
0x7ffff794e46a, 0x7ffff794e4c1,
0x7ffff794d92b, 0x7ffff794ea4d, 0x7ffff794a9c7, 0x7ffff794aa17,
0x7ffff794aa6e, 0x7ffff794aac7,
0x7ffff794ab1e, 0x7ffff794d154, 0x7ffff794d19f, 0x7ffff794d1ec,
0x7ffff794ab75, 0x7ffff794ac25,
0x7ffff794ace9, 0x7ffff794adad, 0x7ffff794ae71, 0x7ffff794d246,
0x7ffff794d29d, 0x7ffff794d32f,
0x7ffff794d3cb, 0x7ffff794d45d, 0x7ffff794d4ef, 0x7ffff794d5ab,
0x7ffff794dc18, 0x7ffff794dcd4,
0x7ffff794d98a, 0x7ffff794da2b, 0x7ffff794dad6, 0x7ffff794db77,
0x7ffff794d6c0, 0x7ffff794d78b,
0x7ffff794d860, 0x7ffff794e040, 0x7ffff794e81f, 0x7ffff794eaac,
0x7ffff794a974, 0x7ffff794e5d4,
0x7ffff794e22a, 0x7ffff794e276, 0x7ffff794df5a, 0x7ffff794dfb5,
0x7ffff794e885, 0x7ffff794e754,
0x7ffff794e7b5, 0x7ffff794e910, 0x7ffff794e97a, 0x7ffff794a63a,
0x7ffff794a69b, 0x7ffff794a6ff,
0x7ffff794a763, 0x7ffff794a7c0, 0x7ffff794ed86, 0x7ffff794ede6,
0x7ffff795463c, 0x7ffff795472e,
0x7ffff794ee45, 0x7ffff794eeac, 0x7ffff794f1d3, 0x7ffff79509ef,
0x7ffff794f180, 0x7ffff794f23d,
0x7ffff794eefe, 0x7ffff794ef6c, 0x7ffff794f01a, 0x7ffff794f0c8,
0x7ffff794f290, 0x7ffff794f33e,
0x7ffff7956910, 0x7ffff79566d6, 0x7ffff794f3f9, 0x7ffff794f4d4,
0x7ffff794f53b, 0x7ffff794659f,
0x7ffff794595e, 0x7ffff79502b3, 0x7ffff7950312...}
cur_op = 0x7ffff5a0e8ce "\006"
bytecode_start = 0x7ffff5a0e79e "\237"
reg_base = 0x2cbcc60
cu = 0x66ac70
cur_callsite = 0x7ffff7ddc2e0
#2 0x00007ffff79d02ff in MVM_vm_run_file (instance=0x602010,
filename=0x7fffffffe72d
"/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/perl6.moarvm")
at src/moar.c:210
start_frame = <optimized out>
tc = 0x6026c0
cu = 0x669a50
#3 0x000000000040100d in main (argc=6, argv=0x7fffffffe418) at src/main.c:189
instance = 0x602010
input_file = 0x7fffffffe72d
"/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/perl6.moarvm"
executable_name = <optimized out>
lib_path = {
0x7fffffffe6d1
"/home/christian/my_files/computer/Perl6/tmp/rakudo_work_1/install/share/nqp/lib",
0x7fffffffe72b ".", 0x0, 0x7fffffffe31e "", 0x7fffffffe31f "",
0x400b39 "H\203\304", <incomplete sequence \303>, 0x1 <Address 0x1
out of bounds>,
0x4011fd
"H\203\303\001H9\353r\352H\213\\$\bH\213l$\020L\213d$\030L\213l$
L\213t$(L\213|$0H\203\304\070Ð\220\220H\203\354\bH\203\304", <incomplete
sequence \303>}
dump = <optimized out>
full_cleanup = <optimized out>
argi = 5
lib_path_i = <optimized out>
flag = 6