Skip to content

Instantly share code, notes, and snippets.

@dogbert17
dogbert17 / gist:34f979acee7d605b06f3e4038b8ee21f
Created February 3, 2022 17:43
SEGV in t/02-rakudo/repl.t
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.b2d97e39327e49f583d2b42f2f4e8691.358445.1643821268000000000000
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@dogbert17
dogbert17 / gist:6b316ea9bbc836f4506657a08197e87f
Created January 16, 2022 15:02
Mysterious SEGV when running spectest
dogbert@dogbert-VirtualBox:~/repos/rakudo$ gdb install/bin/moar core.moar.1000.fe02281e586e4bf7a95818aee37796e3.500627.1642345053000000000000
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 9.2
Copyright (C) 2020 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
@dogbert17
dogbert17 / gist:6e3669287a7cfbce0eba1d391550f08f
Created December 29, 2021 20:55
GC error in t/05-messages/03-errors.t
Thread 1 "moar" hit Breakpoint 1, MVM_panic (exitCode=0, messageFormat=0x0) at src/core/exceptions.c:840
840 MVM_NO_RETURN void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_panic (exitCode=0, messageFormat=0x0) at src/core/exceptions.c:840
#1 0x00007ffff7869e72 in MVM_gc_root_add_frame_registers_to_worklist (tc=0x55555555ae30, worklist=0x555557a4e5e0, frame=0x7ffff72272d8) at src/gc/roots.c:456
#2 0x00007ffff7869cc3 in MVM_gc_root_add_frame_roots_to_worklist (tc=0x55555555ae30, worklist=0x555557a4e5e0, cur_frame=0x7ffff72272d8) at src/gc/roots.c:429
#3 0x00007ffff78278fd in mark (tc=0x55555555ae30, from_record=0x7ffff7228240, worklist=0x555557a4e5e0, snapshot=0x0) at src/core/callstack.c:915
#4 0x00007ffff78297c8 in MVM_callstack_mark_current_thread (tc=0x55555555ae30, worklist=0x555557a4e5e0, snapshot=0x0) at src/core/callstack.c:1046
#5 0x00007ffff7865e9a in MVM_gc_root_add_tc_roots_to_worklist (tc=0x55555555ae30, worklist=0x555557a4e5e0, snapshot=0x0) at src/gc/roots
@dogbert17
dogbert17 / gist:9bf6d86d03b424c300829bad6b3dafee
Created December 2, 2021 13:10
GC error in t/spec/S32-str/indent.rakudo.moar
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff720e700 (LWP 125092)]
1..63
ok 1 - Simple .indent(1)
ok 2 - Simple .indent(2)
ok 3 - Simple .indent(3)
ok 4 - Simple .indent(4)
ok 5 - New indent goes after existing - .indent(1)
ok 6 - New indent goes after existing - .indent(2)
@dogbert17
dogbert17 / gist:810f1471907e2c2fa433dde90bb57a19
Created November 18, 2021 12:57
GC bug with small nursery
Starting program: /home/dogbert/repos/rakudo/install/bin/moar --execname=/home/dogbert/repos/rakudo/rakudo-gdb-m --libpath=/home/dogbert/repos/rakudo --libpath=/home/dogbert/repos/rakudo/blib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib /home/dogbert/repos/rakudo/perl6.moarvm -Ilib t/spec/S04-blocks-and-statements/let.t
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff72f8700 (LWP 210684)]
Thread 1 "moar" hit Breakpoint 1, MVM_panic (exitCode=exitCode@entry=1, messageFormat=messageFormat@entry=0x7ffff7a4f118 "Adding pointer %p to past fromspace to GC worklist") at src/core/exceptions.c:840
840 MVM_NO_RETURN void MVM_panic(MVMint32 exitCode, const char *messageFormat, ...) {
(gdb) bt
#0 MVM_panic (exitCode=exitCode@entry=1, messageFormat=messageFormat@entry=0x7ffff7a4f118 "Adding pointer %p to past fromspace to GC worklist") at src/core/exceptions.c:840
#1 0x00007ffff78b99c4 in MVM_callsite_mark (tc=tc@e
@dogbert17
dogbert17 / gist:93fc8512fda91df90563d5ce49522baa
Created November 12, 2021 17:53
Memory allocation error
dogbert@dogbert-VirtualBox:~/repos/rakudo$ MVM_SPESH_NODELAY=1 ./rakudo-gdb-m -Ilib t/spec/S32-num/complex.t
================================================================================================
This is Rakudo running in the debugger, which often allows the user to generate useful back-
traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code.
This Rakudo version is 2021.10.90.gfca.63.e.6.c.0 built on MoarVM version 2021.10.65.gf.8.addda.15,
running on linuxmint (20.Ulyana) / linux
Type `bt full` to generate a backtrace if applicable, type `q` to quit or `help` for help.
------------------------------------------------------------------------------------------------
dogbert@dogbert-VirtualBox:~/repos/rakudo/nqp$ git diff
diff --git a/src/HLL/sprintf.nqp b/src/HLL/sprintf.nqp
index 0c34b976b..307dff86d 100644
--- a/src/HLL/sprintf.nqp
+++ b/src/HLL/sprintf.nqp
@@ -1,6 +1,5 @@
my module sprintf {
my @handlers;
- my $assert_used_args;
@dogbert17
dogbert17 / gist:aba76e5696ae6aaaa3cc6b405c9d94ce
Created November 6, 2021 12:41
Failure in t/spec/S07-hyperrace/basics.t
ok 32 - Correct result of .hyper.map(*+1) (try 4)
Directive x not applicable for value of type Int
at gen/moar/stage2/NQPHLL.nqp:3180 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:panic)
from gen/moar/stage2/NQPHLL.nqp:3187 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:bad-type-for-directive)
from gen/moar/stage2/NQPHLL.nqp:3676 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:)
from <unknown>:1 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:3225 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:intify)
from gen/moar/stage2/NQPHLL.nqp:3674 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:directive:sym<x>)
from <unknown>:1 (/home/dogbert/repos/rakudo/install/share/nqp/lib/NQPHLL.moarvm:directive:sym<x>)
from gen/moar/stage2/QRegex.nqp:1704 (/home/dogbert/repos/rakudo/install/share/nqp/lib/QRegex.moarvm:!protoregex)
use Test;
for ^1000 {
subtest 'Complex smartmatch against Range' => {
my @false = [i, 1..10], [i, -2e300.Int..2e300.Int], [i, -2e300.Int..2e300.Int],
[<0+0i>, 1..10], [i, 'a'..Inf], [i, 'a'..'z'];
# these cases are true because the imaginary part is small enough that
# we can convert these Complex into Real
my @true = [<0+0i>, -1..10], [<42+0i>, 10..50],
@dogbert17
dogbert17 / gist:9c648c7e45d31a09abc686c6e046b573
Last active November 1, 2021 20:53
MVM_SPESH_BLOCKING=1 MVM_SPESH_NODELAY=1 ./rakudo-m -Ilib --ll-exception t/spec/S02-types/range.t
Already set resume init args for this dispatcher
at gen/moar/BOOTSTRAP/v6c.nqp:6483 (/home/dogbert/repos/rakudo/blib/Perl6/BOOTSTRAP/v6c.moarvm:)
from SETTING::src/core.c/control.pm6:142 (/home/dogbert/repos/rakudo/blib/CORE.c.setting.moarvm:nextwith)
from t/spec/S02-types/range.t:424 (<ephemeral file>:)
from t/spec/S02-types/range.t:424 (<ephemeral file>:)
from /home/dogbert/repos/rakudo/lib/Test.rakumod (Test):437 (/home/dogbert/repos/rakudo/lib/.precomp/C601F303FBC246C4EF142E264D5F787A045E64E9/5E/5EA2A7E78354B30F3134E1ECF9CECB9AA20D5387:)
from /home/dogbert/repos/rakudo/lib/Test.rakumod (Test):427 (/home/dogbert/repos/rakudo/lib/.precomp/C601F303FBC246C4EF142E264D5F787A045E64E9/5E/5EA2A7E78354B30F3134E1ECF9CECB9AA20D5387:subtest)
from /home/dogbert/repos/rakudo/lib/Test.rakumod (Test):425 (/home/dogbert/repos/rakudo/lib/.precomp/C601F303FBC246C4EF142E264D5F787A045E64E9/5E/5EA2A7E78354B30F3134E1ECF9CECB9AA20D5387:subtest)
from t/spec/S02-types/range.t:411 (<ephemeral file>:<unit>)
from t/