Advertisement
Guest User

Untitled

a guest
Oct 11th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. valgrind --track-origins=yes ./program test_input.txt
  2. ==8469== Memcheck, a memory error detector
  3. ==8469== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
  4. ==8469== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
  5. ==8469== Command: ./test5 test_input.txt
  6. ==8469==
  7. Step: 1
  8. ==8469== Use of uninitialised value of size 8
  9. ==8469== at 0x400629: main (in /home/bob/Dropbox/programs/program)
  10. ==8469== Uninitialised value was created by a heap allocation
  11. ==8469== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  12. ==8469== by 0x4005DD: main (in /home/bob/Dropbox/programs/program)
  13. ==8469==
  14. ==8469== Invalid write of size 8
  15. ==8469== at 0x400629: main (in /home/bob/Dropbox/programs/program)
  16. ==8469== Address 0x0 is not stack'd, malloc'd or (recently) free'd
  17. ==8469==
  18. ==8469==
  19. ==8469== Process terminating with default action of signal 11 (SIGSEGV)
  20. ==8469== Access not within mapped region at address 0x0
  21. ==8469== at 0x400629: main (in /home/bob/Dropbox/programs/program)
  22. ==8469== If you believe this happened as a result of a stack
  23. ==8469== overflow in your program's main thread (unlikely but
  24. ==8469== possible), you can try to increase the size of the
  25. ==8469== main thread stack using the --main-stacksize= flag.
  26. ==8469== The main thread stack size used in this run was 8388608.
  27. ==8469==
  28. ==8469== HEAP SUMMARY:
  29. ==8469== in use at exit: 36 bytes in 2 blocks
  30. ==8469== total heap usage: 3 allocs, 1 frees, 1,060 bytes allocated
  31. ==8469==
  32. ==8469== LEAK SUMMARY:
  33. ==8469== definitely lost: 4 bytes in 1 blocks
  34. ==8469== indirectly lost: 0 bytes in 0 blocks
  35. ==8469== possibly lost: 0 bytes in 0 blocks
  36. ==8469== still reachable: 32 bytes in 1 blocks
  37. ==8469== suppressed: 0 bytes in 0 blocks
  38. ==8469== Rerun with --leak-check=full to see details of leaked memory
  39. ==8469==
  40. ==8469== For counts of detected and suppressed errors, rerun with: -v
  41. ==8469== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
  42. Segmentation fault
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement