Skip to content

Instantly share code, notes, and snippets.

@matthewd
Created October 5, 2016 22:36
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 matthewd/0d584378aa3c083fa3581c72f15e292a to your computer and use it in GitHub Desktop.
Save matthewd/0d584378aa3c083fa3581c72f15e292a to your computer and use it in GitHub Desktop.
==12634== Memcheck, a memory error detector
==12634== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==12634== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==12634== Command: /home/matthew/.rbenv/versions/compiled/bin/ruby -Ilib:test test/client_test.rb -vs26
==12634== Parent PID: 1523
==12634==
==12634== Thread 92 client.rb:42:
==12634== Syscall param read(buf) points to unaddressable byte(s)
==12634== at 0x4E4A55D: ??? (syscall-template.S:84)
==12634== by 0x29A92E: rb_thread_io_blocking_region (thread.c:1414)
==12634== by 0x160936: rb_read_internal (io.c:982)
==12634== by 0x160936: io_fillbuf.part.37 (io.c:1770)
==12634== by 0x166DF9: io_getc (io.c:3532)
==12634== by 0x272F0F: vm_call_cfunc_with_frame (vm_insnhelper.c:1642)
==12634== by 0x272F0F: vm_call_cfunc (vm_insnhelper.c:1737)
==12634== by 0x279E48: vm_exec_core (insns.def:994)
==12634== by 0x27E9F5: vm_exec (vm.c:1650)
==12634== by 0x27F6CC: invoke_block (vm.c:921)
==12634== by 0x27F6CC: invoke_block_from_c_0 (vm.c:971)
==12634== by 0x27F7A2: invoke_block_from_c_unsplattable (vm.c:996)
==12634== by 0x27F7A2: vm_invoke_proc (vm.c:1044)
==12634== by 0x299915: thread_start_func_2 (thread.c:584)
==12634== by 0x299D8F: thread_start_func_1 (thread_pthread.c:882)
==12634== by 0x4E416F9: start_thread (pthread_create.c:333)
==12634== Address 0x10b8a870 is 0 bytes inside a block of size 8,192 free'd
==12634== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12634== by 0x15477D: objspace_xfree (gc.c:7704)
==12634== by 0x15477D: ruby_sized_xfree (gc.c:7793)
==12634== by 0x15477D: ruby_xfree (gc.c:7800)
==12634== by 0x1661FD: free_io_buffer (io.c:4285)
==12634== by 0x1661FD: fptr_finalize (io.c:4265)
==12634== by 0x1661FD: rb_io_fptr_cleanup (io.c:4277)
==12634== by 0x166508: io_close_fptr (io.c:4366)
==12634== by 0x166508: rb_io_close (io.c:4384)
==12634== by 0x166688: rb_io_close_m (io.c:4412)
==12634== by 0x272F0F: vm_call_cfunc_with_frame (vm_insnhelper.c:1642)
==12634== by 0x272F0F: vm_call_cfunc (vm_insnhelper.c:1737)
==12634== by 0x279E48: vm_exec_core (insns.def:994)
==12634== by 0x27E9F5: vm_exec (vm.c:1650)
==12634== by 0x281359: vm_call0_body.constprop.118 (vm_eval.c:182)
==12634== by 0x2819F6: vm_call0 (vm_eval.c:61)
==12634== by 0x2819F6: rb_call0 (vm_eval.c:351)
==12634== by 0x277603: vm_yield_with_cfunc (vm_insnhelper.c:2338)
==12634== by 0x27A0FF: vm_invoke_block (vm_insnhelper.c:2467)
==12634== by 0x27A0FF: vm_exec_core (insns.def:1033)
==12634== Block was alloc'd at
==12634== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==12634== by 0x153A6B: objspace_xmalloc (gc.c:7648)
==12634== by 0x160A53: io_fillbuf (io.c:1762)
==12634== by 0x166DF9: io_getc (io.c:3532)
==12634== by 0x272F0F: vm_call_cfunc_with_frame (vm_insnhelper.c:1642)
==12634== by 0x272F0F: vm_call_cfunc (vm_insnhelper.c:1737)
==12634== by 0x279E48: vm_exec_core (insns.def:994)
==12634== by 0x27E9F5: vm_exec (vm.c:1650)
==12634== by 0x27F6CC: invoke_block (vm.c:921)
==12634== by 0x27F6CC: invoke_block_from_c_0 (vm.c:971)
==12634== by 0x27F7A2: invoke_block_from_c_unsplattable (vm.c:996)
==12634== by 0x27F7A2: vm_invoke_proc (vm.c:1044)
==12634== by 0x299915: thread_start_func_2 (thread.c:584)
==12634== by 0x299D8F: thread_start_func_1 (thread_pthread.c:882)
==12634== by 0x4E416F9: start_thread (pthread_create.c:333)
==12634==
==12634==
==12634== HEAP SUMMARY:
==12634== in use at exit: 99,913,497 bytes in 231,917 blocks
==12634== total heap usage: 894,579 allocs, 662,662 frees, 431,163,029 bytes allocated
==12634==
==12634== LEAK SUMMARY:
==12634== definitely lost: 6,160,270 bytes in 52,345 blocks
==12634== indirectly lost: 12,007,405 bytes in 90,848 blocks
==12634== possibly lost: 13,535,677 bytes in 67,867 blocks
==12634== still reachable: 68,210,145 bytes in 20,857 blocks
==12634== suppressed: 0 bytes in 0 blocks
==12634== Rerun with --leak-check=full to see details of leaked memory
==12634==
==12634== For counts of detected and suppressed errors, rerun with: -v
==12634== ERROR SUMMARY: 2 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