Skip Menu |
Report information
Id: 128325
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: ivan.oleynikov95 [at] gmail.com
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: Moar



Subject: Moarvm segfaults or produces variuos erros while iterating through $list.race
Download (untitled) / with headers
text/plain 7.2k
$ perl6 -v This is Rakudo version 2016.04 built on MoarVM version 2016.04 implementing Perl 6.c. I got segfault(see core in attachments) and various errors while running the attached script `a.pl`. The interesting thing is that it runs successfully if you replace $exploits by @exploits. Error examples: $ perl6 a.pl targets are a b c d e Segmentation fault $ perl6 a.pl targets are a b c d e This Seq has already been iterated, and its values consumed (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in block at a.pl line 20 $ perl6 a.pl targets are a b c d e Cannot invoke this object (REPR: Uninstantiable) in block at a.pl line 20 $ perl6 a.pl targets are a b c d e *** Error in `/home/gnull/prefix/bin/moar': double free or corruption (!prev): 0x0acfa690 *** ======= Backtrace: ========= /lib/i386-linux-gnu/libc.so.6(+0x756fb)[0xb72c96fb] /lib/i386-linux-gnu/libc.so.6(+0x76440)[0xb72ca440] /lib/i386-linux-gnu/libc.so.6(closedir+0x28)[0xb72f41f8] /home/gnull/prefix/lib/libmoar.so(MVM_dir_close+0x41)[0xb74b9321] /home/gnull/prefix/lib/libmoar.so(MVM_interp_run+0xa9d4)[0xb747e6a4] /home/gnull/prefix/lib/libmoar.so(+0xac0d2)[0xb74980d2] /home/gnull/prefix/lib/libmoar.so(+0x17e6f0)[0xb756a6f0] /lib/i386-linux-gnu/libpthread.so.0(+0x6a0d)[0xb71fda0d] /lib/i386-linux-gnu/libc.so.6(clone+0x5e)[0xb732dece] ======= Memory map: ======== 08048000-0804a000 r-xp 00000000 08:01 1570448 /home/gnull/prefix/bin/moar 0804a000-0804b000 rw-p 00001000 08:01 1570448 /home/gnull/prefix/bin/moar 0837a000-0b3b7000 rw-p 00000000 00:00 0 [heap] b3b00000-b3b59000 rw-p 00000000 00:00 0 b3b59000-b3c00000 ---p 00000000 00:00 0 b3d00000-b3d30000 rw-p 00000000 00:00 0 b3d30000-b3e00000 ---p 00000000 00:00 0 b3e0f000-b3e2b000 r-xp 00000000 08:01 392452 /lib/i386-linux-gnu/libgcc_s.so.1 b3e2b000-b3e2c000 rw-p 0001b000 08:01 392452 /lib/i386-linux-gnu/libgcc_s.so.1 b3e50000-b3e51000 ---p 00000000 00:00 0 b3e51000-b4650000 rwxp 00000000 00:00 0 b4650000-b4a51000 rw-p 00000000 00:00 0 b4a51000-b4a52000 ---p 00000000 00:00 0 b4a52000-b5251000 rwxp 00000000 00:00 0 b5251000-b5a53000 rw-p 00000000 00:00 0 b5a53000-b5a5b000 r--p 00000000 08:01 1851304 /home/gnull/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1463953130.12322/9B/9B467EEF9267A777BB53BAA2F19BE2C9D756BEED b5a5b000-b5a69000 r--p 00000000 08:01 1851114 /home/gnull/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1463953130.12322/7C/7C734D5DD25632F40E0515854A6BDC15230CCBEF b5a69000-b5aff000 rw-p 00000000 00:00 0 b5aff000-b5b49000 r--p 00000000 08:01 1850843 /home/gnull/prefix/share/nqp/lib/Perl6/Metamodel.moarvm b5b49000-b5b77000 r--p 00000000 08:01 1850844 /home/gnull/prefix/share/nqp/lib/Perl6/BOOTSTRAP.moarvm b5b77000-b5b98000 rw-p 00000000 00:00 0 b5b98000-b6683000 r--p 00000000 08:01 1850845 /home/gnull/prefix/share/perl6/runtime/CORE.setting.moarvm b6683000-b6689000 r-xp 00000000 08:01 1850849 /home/gnull/prefix/share/perl6/runtime/dynext/libperl6_ops_moar.so b6689000-b668a000 rw-p 00005000 08:01 1850849 /home/gnull/prefix/share/perl6/runtime/dynext/libperl6_ops_moar.so b668a000-b66b1000 r--p 00000000 08:01 1850840 /home/gnull/prefix/share/nqp/lib/Perl6/Optimizer.moarvm b66b1000-b66b7000 r--p 00000000 08:01 1850842 /home/gnull/prefix/share/nqp/lib/Perl6/Compiler.moarvm b66b7000-b66f9000 rw-p 00000000 00:00 0 b66f9000-b66fe000 r--p 00000000 08:01 1847671 /home/gnull/prefix/share/nqp/lib/Perl6/ModuleLoader.moarvm b66fe000-b6748000 r--p 00000000 08:01 1847749 /home/gnull/prefix/share/nqp/lib/Perl6/World.moarvm b6748000-b6758000 r--p 00000000 08:01 1850838 /home/gnull/prefix/share/nqp/lib/Perl6/Ops.moarvm b6758000-b676b000 r--p 00000000 08:01 1850841 /home/gnull/prefix/share/nqp/lib/Perl6/Pod.moarvm b676b000-b684f000 r--p 00000000 08:01 1850839 /home/gnull/prefix/share/nqp/lib/Perl6/Actions.moarvm b684f000-b688a000 r--p 00000000 08:01 1850834 /home/gnull/prefix/share/nqp/lib/NQPP5QRegex.moarvm b688a000-b6c3c000 r--p 00000000 08:01 1850837 /home/gnull/prefix/share/nqp/lib/Perl6/Grammar.moarvm b6c3c000-b6c57000 r--p 00000000 08:01 1850829 /home/gnull/prefix/share/nqp/lib/MASTOps.moarvm b6c57000-b6c64000 r--p 00000000 08:01 1850830 /home/gnull/prefix/share/nqp/lib/MASTNodes.moarvm b6c64000-b6cd8000 r--p 00000000 08:01 1850831 /home/gnull/prefix/share/nqp/lib/QAST.moarvm b6cd8000-b6d30000 r--p 00000000 08:01 1850828 /home/gnull/prefix/share/nqp/lib/NQPHLL.moarvm b6d30000-b6d49000 r--p 00000000 08:01 1850826 /home/gnull/prefix/share/nqp/lib/QASTNode.moarvm b6d49000-b6d6e000 r--p 00000000 08:01 1850827 /home/gnull/prefix/share/nqp/lib/QRegex.moarvm b6d6e000-b6dd2000 r--p 00000000 08:01 1850832 /home/gnull/prefix/share/nqp/lib/NQPP6QRegex.moarvm b6dd2000-b6de6000 r--p 00000000 08:01 1850823 /home/gnull/prefix/share/nqp/lib/nqpmo.moarvm b6de6000-b71e9000 rw-p 00000000 00:00 0 b71e9000-b71ec000 r-xp 00000000 08:01 395688 /lib/i386-linux-gnu/libdl-2.17.so b71ec000-b71ed000 r--p 00002000 08:01 395688 /lib/i386-linux-gnu/libdl-2.17.so b71ed000-b71ee000 rw-p 00003000 08:01 395688 /lib/i386-linux-gnu/libdl-2.17.so b71ee000-b71f5000 r-xp 00000000 08:01 395703 /lib/i386-linux-gnu/librt-2.17.so b71f5000-b71f6000 r--p 00006000 08:01 395703 /lib/i386-linux-gnu/librt-2.17.so b71f6000-b71f7000 rw-p 00007000 08:01 395703 /lib/i386-linux-gnu/librt-2.17.so b71f7000-b720d000 r-xp 00000000 08:01 395645 /lib/i386-linux-gnu/libpthread-2.17.so b720d000-b720e000 r--p 00015000 08:01 395645 /lib/i386-linux-gnu/libpthread-2.17.so b720e000-b720f000 rw-p 00016000 08:01 395645 /lib/i386-linux-gnu/libpthread-2.17.so b720f000-b7211000 rw-p 00000000 00:00 0 b7211000-b7251000 r-xp 00000000 08:01 395689 /lib/i386-linux-gnu/libm-2.17.so b7251000-b7252000 r--p 0003f000 08:01 395689 /lib/i386-linux-gnu/libm-2.17.so b7252000-b7253000 rw-p 00040000 08:01 395689 /lib/i386-linux-gnu/libm-2.17.so b7253000-b7254000 rw-p 00000000 00:00 0 b7254000-b73c2000 r-xp 00000000 08:01 395685 /lib/i386-linux-gnu/libc-2.17.so b73c2000-b73c4000 r--p 0016e000 08:01 395685 /lib/i386-linux-gnu/libc-2.17.so b73c4000-b73c5000 rw-p 00170000 08:01 395685 /lib/i386-linux-gnu/libc-2.17.so b73c5000-b73c8000 rw-p 00000000 00:00 0 b73d2000-b73d3000 rw-p 00000000 00:00 0 b73d3000-b73da000 r--p 00000000 08:01 1851112 /home/gnull/.perl6/precomp/D7820A4EF6D97B780F45CAC4B50C4E6E59589690.1463953130.12322/E7/E796CB0CB7DEAEAFA56E8558AD18241417AC328A b73da000-b73e6000 r--p 00000000 08:01 1850825 /home/gnull/prefix/share/nqp/lib/NQPCORE.setting.moarvm b73e6000-b73e9000 r--p 00000000 08:01 1850824 /home/gnull/prefix/share/nqp/lib/ModuleLoader.moarvm b73e9000-b73ec000 r--p 00000000 08:01 1850847 /home/gnull/prefix/share/perl6/runtime/perl6.moarvm b73ec000-b76e2000 r-xp 00000000 08:01 1570465 /home/gnull/prefix/lib/libmoar.so b76e2000-b773a000 rw-p 002f6000 08:01 1570465 /home/gnull/prefix/lib/libmoar.so b773a000-b773d000 rw-p 00000000 00:00 0 b773d000-b773e000 r-xp 00000000 00:00 0 [vdso] b773e000-b775d000 r-xp 00000000 08:01 395681 /lib/i386-linux-gnu/ld-2.17.so b775d000-b775e000 r--p 0001f000 08:01 395681 /lib/i386-linux-gnu/ld-2.17.so b775e000-b775f000 rw-p 00020000 08:01 395681 /lib/i386-linux-gnu/ld-2.17.so bfb11000-bfb31000 rwxp 00000000 00:00 0 [stack] bfb31000-bfb32000 rw-p 00000000 00:00 0
Subject: a.pl
Download a.pl
text/x-perl 630b
#!/usr/bin/env perl6 use JSON::Tiny; # Some data to work with mkdir ‘data-for-segfault’; my $script = 「sleep 0.1s」; spurt ‘data-for-segfault/a’, $script; spurt ‘data-for-segfault/b’, $script; chmod 0o755, "data-for-segfault/a", "exploitd/b"; spurt ‘foo.json’, 「{"targets": ["a","b","c","d","e"]}」; # Code my $config = from-json slurp ‘foo.json’; my $targets = $config<targets>; my @exploits = ‘data-for-segfault’.IO.dir.map: {.path}; say "targets are $targets[]"; for $targets.race(batch => 2, degree => 2) -> $target { for @exploits -> $exploit { shell "$exploit $target"; } }
Subject: core.gz
Download core.gz
application/x-gzip 7.6m

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 105b
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org