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 ./test
==159839== Memcheck, a memory error detector
==159839== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==159839== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==159839== Command: ./test
==159839==
Le caractère en 3ème position est: 2
==159839==
==159839== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==159839== Bad permissions for mapped region at address 0x10A00A
==159839== at 0x109178: main (test.c:8)
==159839==
==159839== HEAP SUMMARY:
==159839== in use at exit: 0 bytes in 0 blocks
==159839== total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==159839==
==159839== All heap blocks were freed -- no leaks are possible
==159839==
==159839== For lists of detected and suppressed errors, rerun with: -s
==159839== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault (core dumped) |