1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| valgrind --leak-check=full --track-origins=yes --show-reachable=yes ./erreur
==400595== Memcheck, a memory error detector
==400595== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==400595== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==400595== Command: ./erreur
==400595==
bar = "Hello world !"
==400595== Source and destination overlap in strcpy(0x1fff000575, 0x1fff00057a)
==400595== at 0x484BF00: strcpy (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==400595== by 0x1091B8: main (erreur.c:10)
==400595==
bar = " world !"
==400595==
==400595== HEAP SUMMARY:
==400595== in use at exit: 0 bytes in 0 blocks
==400595== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==400595==
==400595== All heap blocks were freed -- no leaks are possible
==400595==
==400595== For lists of detected and suppressed errors, rerun with: -s
==400595== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) |