rendered paste body[parallels@localhost tmp]$ valgrind -v ./a.out
==12001== Memcheck, a memory error detector
==12001== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==12001== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==12001== Command: ./a.out
==12001==
--12001-- Valgrind options:
--12001-- -v
--12001-- Contents of /proc/version:
--12001-- Linux version 3.4.2-4.fc17.x86_64 (mockbuild@x86-06.phx2.fedoraproject.org) (gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC) ) #1 SMP Thu Jun 14 22:22:05 UTC 2012
--12001-- Arch and hwcaps: AMD64, amd64-sse3-cx16-avx
--12001-- Page sizes: currently 4096, max supported 4096
--12001-- Valgrind library directory: /usr/lib64/valgrind
--12001-- Reading syms from /home/parallels/tmp/a.out
--12001-- Reading syms from /usr/lib64/valgrind/memcheck-amd64-linux
--12001-- object doesn't have a dynamic symbol table
--12001-- Reading syms from /usr/lib64/ld-2.15.so
--12001-- Scheduler: using generic scheduler lock implementation.
--12001-- Reading suppressions file: /usr/lib64/valgrind/default.supp
==12001== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-12001-by-parallels-on-localhost.localdomain
==12001== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-12001-by-parallels-on-localhost.localdomain
==12001== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-12001-by-parallels-on-localhost.localdomain
==12001==
==12001== TO CONTROL THIS PROCESS USING vgdb (which you probably
==12001== don't want to do, unless you know exactly what you're doing,
==12001== or are doing some strange experiment):
==12001== /usr/lib64/valgrind/../../bin/vgdb --pid=12001 ...command...
==12001==
==12001== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==12001== /path/to/gdb ./a.out
==12001== and then give GDB the following command
==12001== target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=12001
==12001== --pid is optional if only one valgrind process is running
==12001==
--12001-- REDIR: 0x31f1e17e90 (strlen) redirected to 0x3806db01 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--12001-- Reading syms from /usr/lib64/valgrind/vgpreload_core-amd64-linux.so
--12001-- Reading syms from /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so
--12001-- REDIR: 0x31f1e17d00 (index) redirected to 0x4a08e20 (index)
--12001-- REDIR: 0x31f1e17d80 (strcmp) redirected to 0x4a09e30 (strcmp)
--12001-- Reading syms from /usr/lib64/libstdc++.so.6.0.17
--12001-- object doesn't have a symbol table
--12001-- Reading syms from /usr/lib64/libm-2.15.so
--12001-- Reading syms from /usr/lib64/libgcc_s-4.7.2-20120921.so.1
--12001-- object doesn't have a symbol table
--12001-- Reading syms from /usr/lib64/libc-2.15.so
--12001-- REDIR: 0x31f22894e0 (strcasecmp) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f2285840 (strnlen) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f228b7b0 (strncasecmp) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f2287230 (__GI_strrchr) redirected to 0x4a08c40 (__GI_strrchr)
--12001-- REDIR: 0x31f2285760 (__GI_strlen) redirected to 0x4a091a0 (__GI_strlen)
--12001-- REDIR: 0x31f2283c20 (strcmp) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f232ea20 (__strcmp_sse42) redirected to 0x4a09d90 (strcmp)
--12001-- REDIR: 0x31f9a5f570 (operator new(unsigned long)) redirected to 0x4a0827f (operator new(unsigned long))
--12001-- REDIR: 0x31f9a5d880 (operator delete(void*)) redirected to 0x4a072e5 (operator delete(void*))
--12001-- REDIR: 0x31f227f450 (malloc) redirected to 0x4a0879a (malloc)
--12001-- REDIR: 0x31f227f980 (free) redirected to 0x4a076ff (free)
--12001-- REDIR: 0x31f2285710 (strlen) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f235f4e0 (__strlen_sse2_pminub) redirected to 0x4a09180 (strlen)
--12001-- REDIR: 0x31f228de90 (memcpy@@GLIBC_2.14) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f23448a0 (__memcpy_ssse3_back) redirected to 0x4a0a160 (memcpy@@GLIBC_2.14)
--12001-- REDIR: 0x31f2287c80 (bcmp) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f2359e10 (__memcmp_sse4_1) redirected to 0x4a0ae80 (bcmp)
checking for d
test()
--12001-- REDIR: 0x31f228f580 (strchrnul) redirected to 0x4a0b7b0 (strchrnul)
--12001-- REDIR: 0x31f2287930 (memchr) redirected to 0x4a09ed0 (memchr)
before: a,b: wrap( 2 ), wrap( 3 )
after : a,b: wrap( 2 ), wrap( 3 )
A==6
test()
before: a,b: wrap( 2 ), wrap( 3 )
after : a,b: wrap( 2 ), wrap( 3 )
A==6
checking for 7adouble
--12001-- REDIR: 0x31f9a5f680 (operator new[](unsigned long)) redirected to 0x4a07c02 (operator new[](unsigned long))
--12001-- REDIR: 0x31f22882c0 (memset) redirected to 0x48016fe (_vgnU_ifunc_wrapper)
--12001-- REDIR: 0x31f2288300 (__GI_memset) redirected to 0x4a0b260 (memset)
--12001-- REDIR: 0x31f9a5d8b0 (operator delete[](void*)) redirected to 0x4a06e35 (operator delete[](void*))
test()
before: a,b: wrap( 2(a) ), wrap( 3(a) )
after : a,b: wrap( 2(a) ), wrap( 3(a) )
A==6(a)
test()
before: a,b: wrap( 2(a) ), wrap( 3(a) )
after : a,b: wrap( 6(a) ), wrap( 6(a) )
A==6(a)
==12001==
==12001== HEAP SUMMARY:
==12001== in use at exit: 0 bytes in 0 blocks
==12001== total heap usage: 40 allocs, 40 frees, 3,856 bytes allocated
==12001==
==12001== All heap blocks were freed -- no leaks are possible
==12001==
==12001== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
--12001--
--12001-- used_suppression: 2 glibc-2.5.x-on-SUSE-10.2-(PPC)-2a
==12001==
==12001== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)