Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created October 6, 2016 21:08
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/2eff5a72b684f4d46728526395b8ec88 to your computer and use it in GitHub Desktop.
Save dogbert17/2eff5a72b684f4d46728526395b8ec88 to your computer and use it in GitHub Desktop.
valgrind t/04-nativecall/08-callbacks.t 32bit Linux
================================================================================================
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.09.142.g.605.f.272 built on MoarVM version 2016.09.24.g.542.b.899,
running on ubuntu (14.04.3.LTS.Trusty.Tahr) / linux (3.19.0.32.generic)
------------------------------------------------------------------------------------------------
==17747== Memcheck, a memory error detector
==17747== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==17747== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==17747== 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/perl6.moarvm -Ilib t/04-nativecall/08-callbacks.t
==17747==
1..8
ok 1 - simple callback
==17747== Invalid read of size 4
==17747== at 0x41CC36E: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== Address 0xbef6cc24 is on thread 1's stack
==17747== 12 bytes below stack pointer
==17747==
==17747== Invalid read of size 4
==17747== at 0x41CC378: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== Address 0xbef6cc28 is on thread 1's stack
==17747== 4 bytes below stack pointer
==17747==
==17747== Invalid read of size 4
==17747== at 0x41CC383: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CBB0F: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB50C: dc_callvm_call_x86_cdecl (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB0E1: dcCallVoid (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x410B485: MVM_nativecall_invoke (nativecall_dyncall.c:584)
==17747== by 0x40DC536: MVM_interp_run (interp.c:3955)
==17747== by 0x41C8A22: MVM_vm_run_file (moar.c:304)
==17747== by 0x8048EA5: main (main.c:191)
==17747== Address 0xbef6cc08 is on thread 1's stack
==17747== 36 bytes below stack pointer
==17747==
==17747== Invalid read of size 4
==17747== at 0x41CC385: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CBB0F: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB50C: dc_callvm_call_x86_cdecl (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB0E1: dcCallVoid (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x410B485: MVM_nativecall_invoke (nativecall_dyncall.c:584)
==17747== by 0x40DC536: MVM_interp_run (interp.c:3955)
==17747== by 0x41C8A22: MVM_vm_run_file (moar.c:304)
==17747== by 0x8048EA5: main (main.c:191)
==17747== Address 0xbef6cc0c is on thread 1's stack
==17747== 32 bytes below stack pointer
==17747==
ok 2 - int callback argument
ok 3 - string callback argument
ok 4 - struct callback string argument
ok 5 - struct callback int argument
==17747== Invalid read of size 8
==17747== at 0x41CC38C: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CBB0F: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB50C: dc_callvm_call_x86_cdecl (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB15D: dcCallInt (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x410B51F: MVM_nativecall_invoke (nativecall_dyncall.c:584)
==17747== by 0x40DC536: MVM_interp_run (interp.c:3955)
==17747== by 0x41C8A22: MVM_vm_run_file (moar.c:304)
==17747== by 0x8048EA5: main (main.c:191)
==17747== Address 0xbef6cbf8 is on thread 1's stack
==17747== 36 bytes below stack pointer
==17747==
ok 6 - callback returned a float to C
==17747== Invalid read of size 4
==17747== at 0x41CC383: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CBB0F: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB50C: dc_callvm_call_x86_cdecl (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB15D: dcCallInt (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x410B51F: MVM_nativecall_invoke (nativecall_dyncall.c:584)
==17747== by 0x40DC536: MVM_interp_run (interp.c:3955)
==17747== by 0x41C8A22: MVM_vm_run_file (moar.c:304)
==17747== by 0x8048EA5: main (main.c:191)
==17747== Address 0xbef6cbe8 is on thread 1's stack
==17747== 36 bytes below stack pointer
==17747==
==17747== Invalid read of size 4
==17747== at 0x41CC385: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CBB0F: ??? (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB50C: dc_callvm_call_x86_cdecl (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x41CB15D: dcCallInt (in /home/dogbert/repos/rakudo/install/lib/libmoar.so)
==17747== by 0x410B51F: MVM_nativecall_invoke (nativecall_dyncall.c:584)
==17747== by 0x40DC536: MVM_interp_run (interp.c:3955)
==17747== by 0x41C8A22: MVM_vm_run_file (moar.c:304)
==17747== by 0x8048EA5: main (main.c:191)
==17747== Address 0xbef6cbec is on thread 1's stack
==17747== 32 bytes below stack pointer
==17747==
ok 7 - callback returned a string to C
ok 8 - callback returned a struct to C
==17747==
==17747== HEAP SUMMARY:
==17747== in use at exit: 153,766 bytes in 4,656 blocks
==17747== total heap usage: 430,836 allocs, 426,180 frees, 114,911,161 bytes allocated
==17747==
==17747== LEAK SUMMARY:
==17747== definitely lost: 5,639 bytes in 196 blocks
==17747== indirectly lost: 14,435 bytes in 677 blocks
==17747== possibly lost: 120,032 bytes in 3,751 blocks
==17747== still reachable: 13,660 bytes in 32 blocks
==17747== suppressed: 0 bytes in 0 blocks
==17747== Rerun with --leak-check=full to see details of leaked memory
==17747==
==17747== For counts of detected and suppressed errors, rerun with: -v
==17747== ERROR SUMMARY: 27 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