Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==7798== Memcheck, a memory error detector
- ==7798== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==7798== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
- ==7798== Command: ./free-test
- ==7798==
- ==7798== Invalid read of size 1
- ==7798== at 0x483A852: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x48BB31D: vfprintf (vfprintf.c:1638)
- ==7798== by 0x48C2995: printf (printf.c:33)
- ==7798== by 0x109294: main (main.c:29)
- ==7798== Address 0x4a4a040 is 0 bytes inside a block of size 1 free'd
- ==7798== at 0x483998B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x1091CC: append (main.c:8)
- ==7798== by 0x10927C: main (main.c:28)
- ==7798== Block was alloc'd at
- ==7798== at 0x483774F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x109248: main (main.c:24)
- ==7798==
- ==7798== Invalid free() / delete / delete[] / realloc()
- ==7798== at 0x483897B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x1092A0: main (main.c:30)
- ==7798== Address 0x4a4a040 is 0 bytes inside a block of size 1 free'd
- ==7798== at 0x483998B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x1091CC: append (main.c:8)
- ==7798== by 0x10927C: main (main.c:28)
- ==7798== Block was alloc'd at
- ==7798== at 0x483774F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==7798== by 0x109248: main (main.c:24)
- ==7798==
- ==7798==
- ==7798== HEAP SUMMARY:
- ==7798== in use at exit: 2 bytes in 1 blocks
- ==7798== total heap usage: 3 allocs, 3 frees, 4,099 bytes allocated
- ==7798==
- ==7798== LEAK SUMMARY:
- ==7798== definitely lost: 2 bytes in 1 blocks
- ==7798== indirectly lost: 0 bytes in 0 blocks
- ==7798== possibly lost: 0 bytes in 0 blocks
- ==7798== still reachable: 0 bytes in 0 blocks
- ==7798== suppressed: 0 bytes in 0 blocks
- ==7798== Rerun with --leak-check=full to see details of leaked memory
- ==7798==
- ==7798== For counts of detected and suppressed errors, rerun with: -v
- ==7798== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement