Skip to content

Instantly share code, notes, and snippets.

==28904== Memcheck, a memory error detector
==28904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28904== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==28904== Command: ./core_test --gtest_filter=websocket.work
==28904==
Running main() from core_test_main.cc
Note: Google Test filter = websocket.work
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from websocket
==28904== Memcheck, a memory error detector
==28904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28904== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==28904== Command: ./core_test --gtest_filter=websocket.work
==28904==
Running main() from core_test_main.cc
Note: Google Test filter = websocket.work
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from websocket
==28904== Memcheck, a memory error detector
==28904== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28904== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==28904== Command: ./core_test --gtest_filter=websocket.work
==28904==
Running main() from core_test_main.cc
Note: Google Test filter = websocket.work
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from websocket
[ RUN ] bulk_pull.count_limit
==15328== Conditional jump or move depends on uninitialised value(s)
==15328== at 0xDB0AAB: mdb_cursor_set (mdb.c:6184)
==15328== by 0xDB0A1E: mdb_get (mdb.c:5833)
==15328== by 0x536A4F: get (blockstore_partial.hpp:974)
==15328== by 0x536A4F: nano::block_store_partial<MDB_val, nano::mdb_store>::block_raw_get_by_type(nano::transaction const&, nano::block_hash const&, nano::block_type&) const (blockstore_partial.hpp:896)
==15328== by 0x52D1B1: nano::block_store_partial<MDB_val, nano::mdb_store>::block_exists(nano::transaction const&, nano::block_type, nano::block_hash const&) (blockstore_partial.hpp:148)
==15328== by 0x52D133: nano::block_store_partial<MDB_val, nano::mdb_store>::block_exists(nano::transaction const&, nano::block_hash const&) (blockstore_partial.hpp:158)
==15328== by 0x92B697: nano::bulk_pull_server::set_current_end() (bootstrap_bulk_pull.cpp:438)
==15328== by 0x92D90C: nano::bulk_pull_server::bulk_pull_server(std::shared_ptr<nano::boots
[ RUN ] distributed_work.no_peers
==5737== Use of uninitialised value of size 8
==5737== at 0x9A7A2D: _M_find_before_node (hashtable.h:1544)
==5737== by 0x9A7A2D: _M_find_node (hashtable.h:642)
==5737== by 0x9A7A2D: std::__detail::_Map_base<nano::root, std::pair<nano::root const, std::vector<std::weak_ptr<nano::distributed_work>, std::allocator<std::weak_ptr<nano::distributed_work> > > >, std::allocator<std::pair<nano::root const, std::vector<std::weak_ptr<nano::distributed_work>, std::allocator<std::weak_ptr<nano::distributed_work> > > > >, std::__detail::_Select1st, std::equal_to<nano::root>, std::hash<nano::root>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true>, true>::operator[](nano::root const&) (hashtable_policy.h:721)
==5737== by 0x981FB4: operator[] (unordered_map.h:973)
==5737== by 0x981FB4: nano::distributed_work_factory::make(unsigned int, nano::root const&, std::vec
operator new(unsigned long)
??:?
__gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::node>, (__gnu_cxx::_Lock_policy)2> >::allocate(unsigned long, void const*)
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/new_allocator.h:111
std::allocator_traits<std::allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::node>, (__gnu_cxx::_Lock_policy)2> > >::allocate(std::allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::node>, (__gnu_cxx::_Lock_policy)2> >&, unsigned long)
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/alloc_traits.h:436
std::__allocated_ptr<std::allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::node>, (__gnu_cxx::_Lock_policy)2> > > std::__allocate_guarded<std::allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::node>, (__gnu_cxx::_Lock_policy)2> > >(std::allocator<std::_Sp_counted_ptr_inplace<nano::node, std::allocator<nano::no
[ RUN ] rpc.work_peer_one
/home/wezrule/nano/raiblocks/nano/rpc_test/rpc.cpp:2983: Failure
Value of: work_a.is_initialized ()
Actual: false
Expected: true
=================================================================
==4169==ERROR: AddressSanitizer: heap-use-after-free on address 0x62900004a6f1 a t pc 0x00000090c2f6 bp 0x7fff4347fa80 sp 0x7fff4347fa78
READ of size 1 at 0x62900004a6f1 thread T0 (<unknown>)
#0 0x90c2f5 (/home/wezrule/nano/raiblocks/build/rpc_test+0x90c2f5)
#1 0x22e0192 (/home/wezrule/nano/raiblocks/build/rpc_test+0x22e0192)
Running main() from core_test_main.cc
Note: Google Test filter = node.peers
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from node
[ RUN ] node.peers
/usr/local/include/boost/circular_buffer/base.hpp:2359:18: runtime error: addition of unsigned offset to 0x62d00001e460 overflowed to 0x62d00001e400
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/local/include/boost/circular_buffer/base.hpp:2359:18 in
[ OK ] node.peers (6269 ms)
[----------] 1 test from node (6269 ms total)
@wezrule
wezrule / gist:2ecb809cacc393835b65e22f27b485cd
Created October 18, 2019 10:13
ASAN vote_by_hash_bundle
[ RUN ] node.vote_by_hash_bundle
=================================================================
==693==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffeefbfccc0 at pc 0x0001011df406 bp 0x70000f1b1940 sp 0x70000f1b1938
READ of size 8 at 0x7ffeefbfccc0 thread T4321
2019-10-18 09:17:02.251405+0100 atos[723:16242] examining /Users/USER/Library/raiblocks/*/core_test [693]
#0 0x1011df405 in std::__1::__atomic_base<unsigned long, false>::load(std::__1::memory_order) const atomic:926
#1 0x101129723 in std::__1::__atomic_base<unsigned long, false>::operator unsigned long() const atomic:930
#2 0x1013cc83f in node_vote_by_hash_bundle_Test::TestBody()::$_10::operator()(std::__1::shared_ptr<nano::vote>, std::__1::shared_ptr<nano::transport::channel>) const node.cpp:2496
#3 0x1013cc521 in decltype(std::__1::forward<node_vote_by_hash_bundle_Test::TestBody()::$_10&>(fp)(std::__1::forward<std::__1::shared_ptr<nano::vote> >(fp0), std::__1::forward<std::__
WARNING: ThreadSanitizer: thread leak (pid=5898)
Thread T48 'Pkt processing' (tid=5947, finished) created by main thread at:
#0 pthread_create ??:? (core_test+0x4ab0c6)
#1 boost::thread::start_thread_noexcept(boost::thread_attributes const&) ??:? (core_test+0x18305e5)
#2 thread<(lambda at /home/wezrule/nano/nano-node/nano/node/network.cpp:19:62)> /usr/local/include/boost/thread/detail/thread.hpp:277 (core_test+0x1131240)
#3 network /home/wezrule/nano/nano-node/nano/node/network.cpp:19 (core_test+0x1130f97)
#4 node /home/wezrule/nano/nano-node/nano/node/node.cpp:133 (core_test+0x118d716)
#5 void __gnu_cxx::new_allocator<nano::node>::construct<nano::node, boost::asio::io_context&, boost::filesystem::path, nano::alarm&, nano::node_config const&, nano::work_pool&, nano::node_flags&>(nano::node*, boost::asio::io_context&, boost::filesystem::path&&, nano::alarm&, nano::node_config const&, nano::work_pool&, nano::node_flags&) /usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c+