Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. root@ubuntu:/home/ubuntu# valgrind ./a.out
  2. ==5561== Memcheck, a memory error detector
  3. ==5561== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
  4. ==5561== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
  5. ==5561== Command: ./a.out
  6. ==5561==
  7. path --> '/root'
  8. /root./
  9. /root../
  10. ==5561== Invalid read of size 4
  11. ==5561== at 0x52EC1BA: fread (iofread.c:37)
  12. ==5561== by 0x401B82: encryptfile (test2.c:312)
  13. ==5561== by 0x401976: ls_dir (test2.c:260)
  14. ==5561== by 0x40165B: main (test2.c:194)
  15. ==5561== Address 0x0 is not stack'd, malloc'd or (recently) free'd
  16. ==5561==
  17. ==5561==
  18. ==5561== Process terminating with default action of signal 11 (SIGSEGV)
  19. ==5561== Access not within mapped region at address 0x0
  20. ==5561== at 0x52EC1BA: fread (iofread.c:37)
  21. ==5561== by 0x401B82: encryptfile (test2.c:312)
  22. ==5561== by 0x401976: ls_dir (test2.c:260)
  23. ==5561== by 0x40165B: main (test2.c:194)
  24. ==5561== If you believe this happened as a result of a stack
  25. ==5561== overflow in your program's main thread (unlikely but
  26. ==5561== possible), you can try to increase the size of the
  27. ==5561== main thread stack using the --main-stacksize= flag.
  28. ==5561== The main thread stack size used in this run was 8388608.
  29. ==5561==
  30. ==5561== HEAP SUMMARY:
  31. ==5561== in use at exit: 43,125 bytes in 90 blocks
  32. ==5561== total heap usage: 96 allocs, 6 frees, 49,366 bytes allocated
  33. ==5561==
  34. ==5561== LEAK SUMMARY:
  35. ==5561== definitely lost: 0 bytes in 0 blocks
  36. ==5561== indirectly lost: 0 bytes in 0 blocks
  37. ==5561== possibly lost: 0 bytes in 0 blocks
  38. ==5561== still reachable: 43,125 bytes in 90 blocks
  39. ==5561== suppressed: 0 bytes in 0 blocks
  40. ==5561== Rerun with --leak-check=full to see details of leaked memory
  41. ==5561==
  42. ==5561== For counts of detected and suppressed errors, rerun with: -v
  43. ==5561== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
  44. Segmentation fault (core dumped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement