Skip to content

Instantly share code, notes, and snippets.

@heinrich5991
Created January 5, 2020 14:16
Show Gist options
  • Save heinrich5991/e6260630d6e7a59877860b3ae0ef7d84 to your computer and use it in GitHub Desktop.
Save heinrich5991/e6260630d6e7a59877860b3ae0ef7d84 to your computer and use it in GitHub Desktop.
==962864== Memcheck, a memory error detector
==962864== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==962864== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==962864== Command: ./a.out
==962864==
==962864== Conditional jump or move depends on uninitialised value(s)
==962864== at 0x10941D: btree<int, std::allocator<int> >::Insert(int&) (a.cpp:58)
==962864== by 0x109379: main (a.cpp:122)
==962864==
==962864== Use of uninitialised value of size 8
==962864== at 0x109430: btree<int, std::allocator<int> >::Insert(int&) (a.cpp:60)
==962864== by 0x109379: main (a.cpp:122)
==962864==
==962864== Invalid read of size 4
==962864== at 0x109433: btree<int, std::allocator<int> >::Insert(int&) (a.cpp:60)
==962864== by 0x109379: main (a.cpp:122)
==962864== Address 0x1 is not stack'd, malloc'd or (recently) free'd
==962864==
==962864==
==962864== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==962864== Access not within mapped region at address 0x1
==962864== at 0x109433: btree<int, std::allocator<int> >::Insert(int&) (a.cpp:60)
==962864== by 0x109379: main (a.cpp:122)
==962864== If you believe this happened as a result of a stack
==962864== overflow in your program's main thread (unlikely but
==962864== possible), you can try to increase the size of the
==962864== main thread stack using the --main-stacksize= flag.
==962864== The main thread stack size used in this run was 8388608.
==962864==
==962864== HEAP SUMMARY:
==962864== in use at exit: 44 bytes in 2 blocks
==962864== total heap usage: 3 allocs, 1 frees, 72,748 bytes allocated
==962864==
==962864== LEAK SUMMARY:
==962864== definitely lost: 0 bytes in 0 blocks
==962864== indirectly lost: 0 bytes in 0 blocks
==962864== possibly lost: 0 bytes in 0 blocks
==962864== still reachable: 44 bytes in 2 blocks
==962864== suppressed: 0 bytes in 0 blocks
==962864== Rerun with --leak-check=full to see details of leaked memory
==962864==
==962864== Use --track-origins=yes to see where uninitialised values come from
==962864== For lists of detected and suppressed errors, rerun with: -s
==962864== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
fish: 'valgrind ./a.out' terminated by signal SIGSEGV (Address boundary error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment