==1413== Memcheck, a memory error detector ==1413== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al. ==1413== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info ==1413== Command: ./a.out ==1413== ==1413== Invalid read of size 8 ==1413== at 0x4ECC0BF: wcslen (in /lib/libc-2.16.so) ==1413== by 0x400658: main (in /home/mrmagne/test/a.out) ==1413== Address 0x51d5068 is 0 bytes after a block of size 40 alloc'd ==1413== at 0x4C2AA5D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==1413== by 0x40062D: main (in /home/mrmagne/test/a.out) ==1413== ==1413== Conditional jump or move depends on uninitialised value(s) ==1413== at 0x4ECC0D1: wcslen (in /lib/libc-2.16.so) ==1413== by 0x400658: main (in /home/mrmagne/test/a.out) ==1413== ==1413== Conditional jump or move depends on uninitialised value(s) ==1413== at 0x4ECC239: wcslen (in /lib/libc-2.16.so) ==1413== by 0x400658: main (in /home/mrmagne/test/a.out) ==1413== ==1413== Conditional jump or move depends on uninitialised value(s) ==1413== at 0x4ECC240: wcslen (in /lib/libc-2.16.so) ==1413== by 0x400658: main (in /home/mrmagne/test/a.out) ==1413== ==1413== ==1413== HEAP SUMMARY: ==1413== in use at exit: 0 bytes in 0 blocks ==1413== total heap usage: 1 allocs, 1 frees, 40 bytes allocated ==1413== ==1413== All heap blocks were freed -- no leaks are possible ==1413== ==1413== For counts of detected and suppressed errors, rerun with: -v ==1413== Use --track-origins=yes to see where uninitialised values come from ==1413== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 2 from 2)