Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==12750== Memcheck, a memory error detector
- ==12750== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
- ==12750== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
- ==12750== Command: ./main
- ==12750==
- 1 2 3 4 5 6==12750== Invalid write of size 1 //Ввод и нажатие Ctrl+D
- ==12750== at 0x108792: main (main.c:10)
- ==12750== Address 0x522d041 is 0 bytes after a block of size 1 free'd
- ==12750== at 0x4C31D2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x1087B8: main (main.c:12)
- ==12750== Block was alloc'd at
- ==12750== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x10877B: main (main.c:6)
- ==12750==
- ==12750== Argument 'size' of function realloc has a fishy (possibly negative) value: -1166
- ==12750== at 0x4C31D2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x1087B8: main (main.c:12)
- ==12750==
- //Второе нажатие Ctrl+D
- ==12750==
- ==12750== HEAP SUMMARY:
- ==12750== in use at exit: 344,670,489 bytes in 5 blocks
- ==12750== total heap usage: 9 allocs, 4 frees, 430,840,165 bytes allocated
- ==12750==
- ==12750== 1 bytes in 1 blocks are definitely lost in loss record 1 of 3
- ==12750== at 0x4C31D2F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x1087B8: main (main.c:12)
- ==12750==
- ==12750== 172,335,240 bytes in 2 blocks are possibly lost in loss record 2 of 3
- ==12750== at 0x4C2FA3F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x4C31D84: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x1087B8: main (main.c:12)
- ==12750==
- ==12750== 172,335,248 bytes in 2 blocks are definitely lost in loss record 3 of 3
- ==12750== at 0x4C2FA3F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x4C31D84: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==12750== by 0x1087B8: main (main.c:12)
- ==12750==
- ==12750== LEAK SUMMARY:
- ==12750== definitely lost: 172,335,249 bytes in 3 blocks
- ==12750== indirectly lost: 0 bytes in 0 blocks
- ==12750== possibly lost: 172,335,240 bytes in 2 blocks
- ==12750== still reachable: 0 bytes in 0 blocks
- ==12750== suppressed: 0 bytes in 0 blocks
- ==12750==
- ==12750== For counts of detected and suppressed errors, rerun with: -v
- ==12750== ERROR SUMMARY: 18 errors from 5 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment