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