==86412== Memcheck, a memory error detector
==86412== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==86412== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==86412== Command: ./testvalgrind
==86412== Parent PID: 83051
==86412==
==86412== Invalid write of size 1
==86412== at 0x4005BB: main (test.c:7)
==86412== Address 0x520404a is 0 bytes after a block of size 10 alloc'd
==86412== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==86412== by 0x40058E: main (test.c:5)
==86412==
==86412==
==86412== HEAP SUMMARY:
==86412== in use at exit: 10 bytes in 1 blocks
==86412== total heap usage: 1 allocs, 0 frees, 10 bytes allocated
==86412==
==86412== 10 bytes in 1 blocks are definitely lost in loss record 1 of 1
==86412== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==86412== by 0x40058E: main (test.c:5)
==86412==
==86412== LEAK SUMMARY:
==86412== definitely lost: 10 bytes in 1 blocks
==86412== indirectly lost: 0 bytes in 0 blocks
==86412== possibly lost: 0 bytes in 0 blocks
==86412== still reachable: 0 bytes in 0 blocks
==86412== suppressed: 0 bytes in 0 blocks
==86412==
==86412== For counts of detected and suppressed errors, rerun with: -v
==86412== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)