Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active April 13, 2021 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/53ac5d327b0e37539374e642a60dc8cf to your computer and use it in GitHub Desktop.
Save dogbert17/53ac5d327b0e37539374e642a60dc8cf to your computer and use it in GitHub Desktop.
Lizmat's mystery oneliner bug
dogbert@dogbert-VirtualBox:~$ MVM_SPESH_DISABLE=1 perl6 --ll-exception -e 'my %h = "a" .. "e" Z=> 1..5; for %h.keys { %h{$_~$_} = 42 }'
concatenate requires a concrete string, but got null
at SETTING::src/core.c/Str.pm6:3669 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/CORE.c.setting.moarvm:infix:<~>)
from -e:1 (<ephemeral file>:)
from -e:1 (<ephemeral file>:<unit>)
from -e:1 (<ephemeral file>:<unit-outer>)
from gen/moar/stage2/NQPHLL.nqp:1946 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/nqp/lib/NQPHLL.moarvm:eval)
from gen/moar/stage2/NQPHLL.nqp:2056 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/nqp/lib/NQPHLL.moarvm:)
from gen/moar/stage2/NQPHLL.nqp:2111 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/nqp/lib/NQPHLL.moarvm:command_eval)
from gen/moar/Compiler.nqp:109 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/lib/Perl6/Compiler.moarvm:command_eval)
from gen/moar/stage2/NQPHLL.nqp:2036 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/nqp/lib/NQPHLL.moarvm:command_line)
from gen/moar/rakudo.nqp:127 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/perl6.moarvm:MAIN)
from gen/moar/rakudo.nqp:1 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/perl6.moarvm:<mainline>)
from <unknown>:1 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/perl6.moarvm:<main>)
from <unknown>:1 (/home/dogbert/.rakudobrew/versions/moar-master/install/share/perl6/runtime/perl6.moarvm:<entry>)
dogbert@dogbert-VirtualBox:~$ perl6-valgrind-m -e 'my %h = "a" .. "e" Z=> 1..5; for %h.keys { %h{$_~$_} = 42 }'
================================================================================================
This is Rakudo running in valgrind, a tool for debugging and profiling programs.
Running a program in valgrind usually takes *a lot* more time than running it directly,
so please be patient.
Valgrind options can be added with MVM_VALGRIND_OPTS environment variable.
This Rakudo version is 2021.03.174.g.596.ccef.3.b built on MoarVM version 2021.03.39.gba.124.ad.12,
running on linuxmint (20.Ulyana) / linux
------------------------------------------------------------------------------------------------
==1558167== Memcheck, a memory error detector
==1558167== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1558167== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==1558167== Command: /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m -e my\ %h\ =\ "a"\ ..\ "e"\ Z=\>\ 1..5;\ for\ %h.keys\ {\ %h{$_~$_}\ =\ 42\ }
==1558167==
==1558167== Conditional jump or move depends on uninitialised value(s)
==1558167== at 0x4B1ED02: MVM_string_check_arg (ops.h:38)
==1558167== by 0x4B1ED02: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Conditional jump or move depends on uninitialised value(s)
==1558167== at 0x51A61C2: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Use of uninitialised value of size 8
==1558167== at 0x483EF46: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1558167== by 0x51A7E94: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Use of uninitialised value of size 8
==1558167== at 0x483EF54: strlen (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1558167== by 0x51A7E94: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Conditional jump or move depends on uninitialised value(s)
==1558167== at 0x51C1243: _IO_default_xsputn (genops.c:393)
==1558167== by 0x51C1243: _IO_default_xsputn (genops.c:370)
==1558167== by 0x51A627B: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Use of uninitialised value of size 8
==1558167== at 0x51C12B0: _IO_default_xsputn (genops.c:394)
==1558167== by 0x51C12B0: _IO_default_xsputn (genops.c:370)
==1558167== by 0x51A627B: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
==1558167== Use of uninitialised value of size 8
==1558167== at 0x51C12BE: _IO_default_xsputn (genops.c:393)
==1558167== by 0x51C12BE: _IO_default_xsputn (genops.c:370)
==1558167== by 0x51A627B: __vfprintf_internal (vfprintf-internal.c:1688)
==1558167== by 0x51BB119: __vsnprintf_internal (vsnprintf.c:114)
==1558167== by 0x4A48FE6: vsnprintf (stdio2.h:80)
==1558167== by 0x4A48FE6: MVM_exception_throw_adhoc_free_va (exceptions.c:945)
==1558167== by 0x4A492B1: MVM_exception_throw_adhoc (exceptions.c:898)
==1558167== by 0x4B18828: MVM_string_check_arg.part.0 (ops.h:39)
==1558167== by 0x4B1F6E4: MVM_string_check_arg (ops.c:823)
==1558167== by 0x4B1F6E4: MVM_string_concatenate (ops.c:855)
==1558167== by 0x4A54E2B: MVM_interp_run (interp.c:1603)
==1558167== by 0x1098E7: main (in /home/dogbert/.rakudobrew/versions/moar-master/install/bin/rakudo-m)
==1558167==
concatenate requires a concrete string, but got null
in block <unit> at -e line 1
==1558167==
==1558167== HEAP SUMMARY:
==1558167== in use at exit: 60,799,646 bytes in 210,667 blocks
==1558167== total heap usage: 269,042 allocs, 58,375 frees, 111,162,864 bytes allocated
==1558167==
==1558167== LEAK SUMMARY:
==1558167== definitely lost: 0 bytes in 0 blocks
==1558167== indirectly lost: 0 bytes in 0 blocks
==1558167== possibly lost: 1,966,000 bytes in 414 blocks
==1558167== still reachable: 58,833,646 bytes in 210,253 blocks
==1558167== suppressed: 0 bytes in 0 blocks
==1558167== Rerun with --leak-check=full to see details of leaked memory
==1558167==
==1558167== Use --track-origins=yes to see where uninitialised values come from
==1558167== For lists of detected and suppressed errors, rerun with: -s
==1558167== ERROR SUMMARY: 12 errors from 7 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment