On Sat Sep 17 07:29:24 2016, ddgr...@gmail.com wrote: > AlexDaniel++ reminded me about --full-cleanup, so here's the output of > another run with MoarVM built with --debug: > ================================================================================================ > This is Rakudo Perl 6 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. > This Rakudo version is 2016.08.1.212.gab.68.f.82 built on MoarVM > version 2016.08.47.g.2.eedba.8, > running on arch (4.7.3.1.arch) / linux (4.7.2.1.ARCH) > ------------------------------------------------------------------------------------------------ > ==15836== Memcheck, a memory error detector > ==15836== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et > al. > ==15836== Using Valgrind-3.11.0 and LibVEX; rerun with -h for > copyright info > ==15836== Command: /home/dan/Source/perl6/install/bin/moar --full- > cleanup --execname=/home/dan/Source/perl6/install/bin/perl6-valgrind-m > --libpath=/home/dan/Source/perl6/install/share/nqp/lib > --libpath=/home/dan/Source/perl6/install/share/perl6/lib > --libpath=/home/dan/Source/perl6/install/share/perl6/runtime > /home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm -e my\ > $proc\ =\ run(:out,\ :bin,\ "ls");\ run(:in($proc.out),\ :bin,\ > "true"); > ==15836== > ==15836== Invalid read of size 8 > ==15836== at 0x4FC6B04: do_close (syncpipe.c:36) > ==15836== by 0x4FC6B04: gc_free (syncpipe.c:67) > ==15836== by 0x4FE359B: gc_free (MVMOSHandle.c:48) > ==15836== by 0x4FC1F34: MVM_gc_collect_free_nursery_uncopied > (collect.c:580) > ==15836== by 0x4FBE9B6: MVM_gc_global_destruction > (orchestrate.c:511) > ==15836== by 0x50528B1: MVM_vm_destroy_instance (moar.c:391) > ==15836== by 0x400D2D: main (main.c:194) > ==15836== Address 0xffefffe20 is on thread 1's stack > ==15836== 768 bytes below stack pointer > ==15836== > ==15836== Invalid free() / delete / delete[] / realloc() > ==15836== at 0x4C2AD90: free (in > /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==15836== by 0x4FC6B0F: MVM_free (alloc.h:29) > ==15836== by 0x4FC6B0F: do_close (syncpipe.c:37) > ==15836== by 0x4FC6B0F: gc_free (syncpipe.c:67) > ==15836== by 0x4FE359B: gc_free (MVMOSHandle.c:48) > ==15836== by 0x4FC1F34: MVM_gc_collect_free_nursery_uncopied > (collect.c:580) > ==15836== by 0x4FBE9B6: MVM_gc_global_destruction > (orchestrate.c:511) > ==15836== by 0x50528B1: MVM_vm_destroy_instance (moar.c:391) > ==15836== by 0x400D2D: main (main.c:194) > ==15836== Address 0xffefffe20 is on thread 1's stack > ==15836== 672 bytes below stack pointer > ==15836== > ==15836== > ==15836== HEAP SUMMARY: > ==15836== in use at exit: 251,811 bytes in 4,470 blocks > ==15836== total heap usage: 229,054 allocs, 224,585 frees, > 59,799,213 bytes allocated > ==15836== > ==15836== LEAK SUMMARY: > ==15836== definitely lost: 8,998 bytes in 183 blocks > ==15836== indirectly lost: 22,784 bytes in 673 blocks > ==15836== possibly lost: 201,880 bytes in 3,605 blocks > ==15836== still reachable: 18,149 bytes in 9 blocks > ==15836== suppressed: 0 bytes in 0 blocks > ==15836== Rerun with --leak-check=full to see details of leaked memory > ==15836== > ==15836== For counts of detected and suppressed errors, rerun with: -v > ==15836== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from > 0)
The fix in https://github.com/MoarVM/MoarVM/commit/debb859d8df52f9a44c94dc7760b2fe30170e8d3 seems to address this bug and pass the spectest. Would appreciate some further testing, and the bug itself could do with a regression test adding too. /jnthn