Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. ==7798== Memcheck, a memory error detector
  2. ==7798== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
  3. ==7798== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
  4. ==7798== Command: ./free-test
  5. ==7798==
  6. ==7798== Invalid read of size 1
  7. ==7798== at 0x483A852: strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  8. ==7798== by 0x48BB31D: vfprintf (vfprintf.c:1638)
  9. ==7798== by 0x48C2995: printf (printf.c:33)
  10. ==7798== by 0x109294: main (main.c:29)
  11. ==7798== Address 0x4a4a040 is 0 bytes inside a block of size 1 free'd
  12. ==7798== at 0x483998B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  13. ==7798== by 0x1091CC: append (main.c:8)
  14. ==7798== by 0x10927C: main (main.c:28)
  15. ==7798== Block was alloc'd at
  16. ==7798== at 0x483774F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  17. ==7798== by 0x109248: main (main.c:24)
  18. ==7798==
  19. ==7798== Invalid free() / delete / delete[] / realloc()
  20. ==7798== at 0x483897B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  21. ==7798== by 0x1092A0: main (main.c:30)
  22. ==7798== Address 0x4a4a040 is 0 bytes inside a block of size 1 free'd
  23. ==7798== at 0x483998B: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  24. ==7798== by 0x1091CC: append (main.c:8)
  25. ==7798== by 0x10927C: main (main.c:28)
  26. ==7798== Block was alloc'd at
  27. ==7798== at 0x483774F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  28. ==7798== by 0x109248: main (main.c:24)
  29. ==7798==
  30. ==7798==
  31. ==7798== HEAP SUMMARY:
  32. ==7798== in use at exit: 2 bytes in 1 blocks
  33. ==7798== total heap usage: 3 allocs, 3 frees, 4,099 bytes allocated
  34. ==7798==
  35. ==7798== LEAK SUMMARY:
  36. ==7798== definitely lost: 2 bytes in 1 blocks
  37. ==7798== indirectly lost: 0 bytes in 0 blocks
  38. ==7798== possibly lost: 0 bytes in 0 blocks
  39. ==7798== still reachable: 0 bytes in 0 blocks
  40. ==7798== suppressed: 0 bytes in 0 blocks
  41. ==7798== Rerun with --leak-check=full to see details of leaked memory
  42. ==7798==
  43. ==7798== For counts of detected and suppressed errors, rerun with: -v
  44. ==7798== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement