Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created December 17, 2016 15:27
Show Gist options
  • Select an option

  • Save dogbert17/dca0295c16d77b2ff4ae4be19a6f8279 to your computer and use it in GitHub Desktop.

Select an option

Save dogbert17/dca0295c16d77b2ff4ae4be19a6f8279 to your computer and use it in GitHub Desktop.
Suspicious valgrind output from oneliner
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6-valgrind-m -e 'for ^1 { IO::Socket::INET.new( :port($_), :host("127.0.0.1") ); CATCH {next}; say $_~" is open" }'
================================================================================================
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.11.268.g.8.b.36.e.4700 built on MoarVM version 2016.11.60.g.21.abc.2.a.1,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
------------------------------------------------------------------------------------------------
==32319== Memcheck, a memory error detector
==32319== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==32319== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==32319== Command: /home/dogbert/repos/rakudo/install/bin/moar --full-cleanup --execname=./perl6-valgrind-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib -e for\ ^1\ {\ IO::Socket::INET.new(\ :port($_),\ :host("127.0.0.1")\ );\ CATCH\ {next};\ say\ $_~"\ is\ open"\ }
==32319==
==32319== Invalid read of size 4
==32319== at 0x41E9D2F: uv__platform_invalidate_fd (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==32319== by 0x41EF0DC: uv__io_close (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==32319== by 0x41F7497: uv__stream_close (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==32319== by 0x41EE347: uv_close (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==32319== by 0x412CD53: gc_free (syncstream.c:289)
==32319== by 0x4153577: gc_free (MVMOSHandle.c:48)
==32319== by 0x41256D2: MVM_gc_collect_free_gen2_unmarked (collect.c:702)
==32319== by 0x411E825: MVM_gc_global_destruction (orchestrate.c:526)
==32319== by 0x41DC405: MVM_vm_destroy_instance (moar.c:396)
==32319== by 0x8048EB8: main (main.c:195)
==32319== Address 0xbedb4614 is on thread 1's stack
==32319== 17900 bytes below stack pointer
==32319==
==32319==
==32319== HEAP SUMMARY:
==32319== in use at exit: 154,096 bytes in 39,451 blocks
==32319== total heap usage: 352,024 allocs, 312,573 frees, 45,380,140 bytes allocated
==32319==
==32319== LEAK SUMMARY:
==32319== definitely lost: 5,554 bytes in 34,971 blocks
==32319== indirectly lost: 14,960 bytes in 718 blocks
==32319== possibly lost: 120,100 bytes in 3,750 blocks
==32319== still reachable: 13,482 bytes in 12 blocks
==32319== suppressed: 0 bytes in 0 blocks
==32319== Rerun with --leak-check=full to see details of leaked memory
==32319==
==32319== For counts of detected and suppressed errors, rerun with: -v
==32319== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment