Advertisement
Guest User

valgrind

a guest
Apr 29th, 2015
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. valgrind --leak-check=full --show-leak-kinds=all ./skiplist input10000
  2. ==9182== Memcheck, a memory error detector
  3. ==9182== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
  4. ==9182== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
  5. ==9182== Command: ./skiplist input10000
  6. ==9182==
  7. 10000
  8. 1
  9. 10000
  10. ==9182== Invalid read of size 8
  11. ==9182== at 0x4EB50E4: std::istream::sentry::sentry(std::istream&, bool) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  12. ==9182== by 0x4EB53DA: std::istream::operator>>(int&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  13. ==9182== by 0x401606: main (skiplist.cpp:155)
  14. ==9182== Address 0x39380a33323638f2 is not stack'd, malloc'd or (recently) free'd
  15. ==9182==
  16. ==9182==
  17. ==9182== Process terminating with default action of signal 11 (SIGSEGV)
  18. ==9182== General Protection Fault
  19. ==9182== at 0x4EB50E4: std::istream::sentry::sentry(std::istream&, bool) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  20. ==9182== by 0x4EB53DA: std::istream::operator>>(int&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  21. ==9182== by 0x401606: main (skiplist.cpp:155)
  22. ==9182==
  23. ==9182== HEAP SUMMARY:
  24. ==9182== in use at exit: 482,703 bytes in 3,018 blocks
  25. ==9182== total heap usage: 3,018 allocs, 0 frees, 482,703 bytes allocated
  26. ==9182==
  27. ==9182== 32 bytes in 1 blocks are still reachable in loss record 1 of 9
  28. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  29. ==9182== by 0x40138C: main (skiplist.cpp:125)
  30. ==9182==
  31. ==9182== 35 bytes in 1 blocks are possibly lost in loss record 2 of 9
  32. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  33. ==9182== by 0x4EF13B8: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  34. ==9182== by 0x4EF1545: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  35. ==9182== by 0x4EF1AED: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  36. ==9182== by 0x401370: main (skiplist.cpp:121)
  37. ==9182==
  38. ==9182== 144 bytes in 1 blocks are still reachable in loss record 3 of 9
  39. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  40. ==9182== by 0x401491: main (skiplist.cpp:139)
  41. ==9182==
  42. ==9182== 144 bytes in 1 blocks are still reachable in loss record 4 of 9
  43. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  44. ==9182== by 0x4014BF: main (skiplist.cpp:140)
  45. ==9182==
  46. ==9182== 144 bytes in 1 blocks are still reachable in loss record 5 of 9
  47. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  48. ==9182== by 0x400FED: insertNode(int, int) (skiplist.cpp:59)
  49. ==9182== by 0x4015ED: main (skiplist.cpp:159)
  50. ==9182==
  51. ==9182== 568 bytes in 1 blocks are still reachable in loss record 6 of 9
  52. ==9182== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  53. ==9182== by 0x53BF44C: __fopen_internal (iofopen.c:73)
  54. ==9182== by 0x4EB2B5F: std::__basic_file<char>::open(char const*, std::_Ios_Openmode, int) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  55. ==9182== by 0x4EEB039: std::basic_filebuf<char, std::char_traits<char> >::open(char const*, std::_Ios_Openmode) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  56. ==9182== by 0x4EED197: std::basic_fstream<char, std::char_traits<char> >::basic_fstream(char const*, std::_Ios_Openmode) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  57. ==9182== by 0x4013E0: main (skiplist.cpp:127)
  58. ==9182==
  59. ==9182== 8,192 bytes in 1 blocks are still reachable in loss record 7 of 9
  60. ==9182== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  61. ==9182== by 0x4EEAA3B: std::basic_filebuf<char, std::char_traits<char> >::_M_allocate_internal_buffer() (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  62. ==9182== by 0x4EEB051: std::basic_filebuf<char, std::char_traits<char> >::open(char const*, std::_Ios_Openmode) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  63. ==9182== by 0x4EED197: std::basic_fstream<char, std::char_traits<char> >::basic_fstream(char const*, std::_Ios_Openmode) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
  64. ==9182== by 0x4013E0: main (skiplist.cpp:127)
  65. ==9182==
  66. ==9182== 40,004 bytes in 1 blocks are still reachable in loss record 8 of 9
  67. ==9182== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  68. ==9182== by 0x4015A6: main (skiplist.cpp:154)
  69. ==9182==
  70. ==9182== 433,440 bytes in 3,010 blocks are still reachable in loss record 9 of 9
  71. ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
  72. ==9182== by 0x400FED: insertNode(int, int) (skiplist.cpp:59)
  73. ==9182== by 0x4015ED: main (skiplist.cpp:159)
  74. ==9182==
  75. ==9182== LEAK SUMMARY:
  76. ==9182== definitely lost: 0 bytes in 0 blocks
  77. ==9182== indirectly lost: 0 bytes in 0 blocks
  78. ==9182== possibly lost: 35 bytes in 1 blocks
  79. ==9182== still reachable: 482,668 bytes in 3,017 blocks
  80. ==9182== suppressed: 0 bytes in 0 blocks
  81. ==9182==
  82. ==9182== For counts of detected and suppressed errors, rerun with: -v
  83. ==9182== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
  84. Segmentation fault (core dumped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement