Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- valgrind --leak-check=full --show-leak-kinds=all ./skiplist input10000
- ==9182== Memcheck, a memory error detector
- ==9182== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
- ==9182== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
- ==9182== Command: ./skiplist input10000
- ==9182==
- 10000
- 1
- 10000
- ==9182== Invalid read of size 8
- ==9182== at 0x4EB50E4: std::istream::sentry::sentry(std::istream&, bool) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
- ==9182== by 0x4EB53DA: std::istream::operator>>(int&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
- ==9182== by 0x401606: main (skiplist.cpp:155)
- ==9182== Address 0x39380a33323638f2 is not stack'd, malloc'd or (recently) free'd
- ==9182==
- ==9182==
- ==9182== Process terminating with default action of signal 11 (SIGSEGV)
- ==9182== General Protection Fault
- ==9182== at 0x4EB50E4: std::istream::sentry::sentry(std::istream&, bool) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
- ==9182== by 0x4EB53DA: std::istream::operator>>(int&) (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19)
- ==9182== by 0x401606: main (skiplist.cpp:155)
- ==9182==
- ==9182== HEAP SUMMARY:
- ==9182== in use at exit: 482,703 bytes in 3,018 blocks
- ==9182== total heap usage: 3,018 allocs, 0 frees, 482,703 bytes allocated
- ==9182==
- ==9182== 32 bytes in 1 blocks are still reachable in loss record 1 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x40138C: main (skiplist.cpp:125)
- ==9182==
- ==9182== 35 bytes in 1 blocks are possibly lost in loss record 2 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==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)
- ==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)
- ==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)
- ==9182== by 0x401370: main (skiplist.cpp:121)
- ==9182==
- ==9182== 144 bytes in 1 blocks are still reachable in loss record 3 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x401491: main (skiplist.cpp:139)
- ==9182==
- ==9182== 144 bytes in 1 blocks are still reachable in loss record 4 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x4014BF: main (skiplist.cpp:140)
- ==9182==
- ==9182== 144 bytes in 1 blocks are still reachable in loss record 5 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x400FED: insertNode(int, int) (skiplist.cpp:59)
- ==9182== by 0x4015ED: main (skiplist.cpp:159)
- ==9182==
- ==9182== 568 bytes in 1 blocks are still reachable in loss record 6 of 9
- ==9182== at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x53BF44C: __fopen_internal (iofopen.c:73)
- ==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)
- ==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)
- ==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)
- ==9182== by 0x4013E0: main (skiplist.cpp:127)
- ==9182==
- ==9182== 8,192 bytes in 1 blocks are still reachable in loss record 7 of 9
- ==9182== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==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)
- ==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)
- ==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)
- ==9182== by 0x4013E0: main (skiplist.cpp:127)
- ==9182==
- ==9182== 40,004 bytes in 1 blocks are still reachable in loss record 8 of 9
- ==9182== at 0x4C2B800: operator new[](unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x4015A6: main (skiplist.cpp:154)
- ==9182==
- ==9182== 433,440 bytes in 3,010 blocks are still reachable in loss record 9 of 9
- ==9182== at 0x4C2B0E0: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
- ==9182== by 0x400FED: insertNode(int, int) (skiplist.cpp:59)
- ==9182== by 0x4015ED: main (skiplist.cpp:159)
- ==9182==
- ==9182== LEAK SUMMARY:
- ==9182== definitely lost: 0 bytes in 0 blocks
- ==9182== indirectly lost: 0 bytes in 0 blocks
- ==9182== possibly lost: 35 bytes in 1 blocks
- ==9182== still reachable: 482,668 bytes in 3,017 blocks
- ==9182== suppressed: 0 bytes in 0 blocks
- ==9182==
- ==9182== For counts of detected and suppressed errors, rerun with: -v
- ==9182== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
- Segmentation fault (core dumped)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement