[0m #0 0x7f3ed3c2148f in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790
#1 0x5564c792b69f in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) /usr/include/c++/9/bits/basic_string.tcc:225
#2 0x5564c773aaeb in std::filesystem::__cxx11::path::path(std::filesystem::__cxx11::path const&) /usr/include/c++/9/bits/fs_path.h:175
#3 0x5564c773abc4 in std::filesystem::__cxx11::operator/(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&) /usr/include/c++/9/bits/fs_path.h:449
#4 0x5564c835f090 in jami::TransferChannelHandler::onReady(std::shared_ptr<dht::crypto::Certificate> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::shared_ptr<dhtnet::ChannelSocket>) jamidht/transfer_channel_handler.cpp:162
#5 0x5564c80b208b in operator() jamidht/jamiaccount.cpp:2070
#6 0x5564c8144c9b in _M_invoke /usr/include/c++/9/bits/std_function.h:300
#7 0x5564c8e0b25c in std::_Function_handler<void (dht::Hash<32ul> const&, std::shared_ptr<dhtnet::ChannelSocket> const&), dhtnet::ConnectionManager::Impl::addNewMultiplexedSocket(std::weak_ptr<dhtnet::DeviceInfo> const&, dht::Hash<32ul> const&, unsigned long const&, std::shared_ptr<dhtnet::ConnectionInfo> const&)::{lambda(dht::Hash<32ul> const&, std::shared_ptr<dhtnet::ChannelSocket> const&)#1}>::_M_invoke(std::_Any_data const&, dht::Hash<32ul> const&, std::shared_ptr<dhtnet::ChannelSocket> const&) (/foo/test/unitTest/ut_conversation+0x461925c)
#8 0x5564c8e47288 in dhtnet::MultiplexedSocket::Impl::onRequest(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short) (/foo/test/unitTest/ut_conversation+0x4655288)
#9 0x5564c8e47867 in std::_Function_handler<void (), dhtnet::MultiplexedSocket::Impl::handleControlPacket(std::vector<unsigned char, std::allocator<unsigned char> >&&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (/foo/test/unitTest/ut_conversation+0x4655867)
#10 0x5564c8f6bfc6 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<dht::ThreadPool::run(std::function<void ()>&&)::{lambda()#1}> > >::_M_run() (/foo/test/unitTest/ut_conversation+0x4779fc6)
#11 0x7f3ed2e0ddf3 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd6df3)
#12 0x7f3ed3527608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8608)
#13 0x7f3ed2afa352 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x11f352)
0x60400011f250 is located 0 bytes inside of 45-byte region [0x60400011f250,0x60400011f27d)
freed by thread T0 here:
#0 0x7f3ed3c9651f in operator delete(void*) ../../../../src/libsanitizer/asan/asan_new_delete.cc:165
#1 0x5564c773a91f in std::filesystem::__cxx11::path::~path() /usr/include/c++/9/bits/fs_path.h:218
#2 0x5564c8359d46 in jami::TransferChannelHandler::~TransferChannelHandler() jamidht/transfer_channel_handler.cpp:39
#3 0x5564c8359dc9 in jami::TransferChannelHandler::~TransferChannelHandler() jamidht/transfer_channel_handler.cpp:39
#4 0x5564c8221ed4 in std::default_delete<jami::ChannelHandlerInterface>::operator()(jami::ChannelHandlerInterface*) const (/foo/test/unitTest/ut_conversation+0x3a2fed4)
#5 0x5564c825bba0 in std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> >::~unique_ptr() (/foo/test/unitTest/ut_conversation+0x3a69ba0)
#6 0x5564c824e46b in std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >::~pair() /usr/include/c++/9/bits/stl_pair.h:208
#7 0x5564c824e4b3 in void __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::destroy<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >(std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >*) /usr/include/c++/9/ext/new_allocator.h:152
#8 0x5564c823e3fc in void std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > > >::destroy<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >(std::allocator<std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >&, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >*) (/foo/test/unitTest/ut_conversation+0x3a4c3fc)
#9 0x5564c8224716 in std::_Rb_tree<jami::Uri::Scheme, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >, std::_Select1st<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::_M_destroy_node(std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >*) (/foo/test/unitTest/ut_conversation+0x3a32716)
#10 0x5564c81f57e8 in std::_Rb_tree<jami::Uri::Scheme, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >, std::_Select1st<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::_M_drop_node(std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >*) (/foo/test/unitTest/ut_conversation+0x3a037e8)
#11 0x5564c81ca15b in std::_Rb_tree<jami::Uri::Scheme, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >, std::_Select1st<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::_M_erase(std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >*) (/foo/test/unitTest/ut_conversation+0x39d815b)
#12 0x5564c81ca114 in std::_Rb_tree<jami::Uri::Scheme, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >, std::_Select1st<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::_M_erase(std::_Rb_tree_node<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >*) (/foo/test/unitTest/ut_conversation+0x39d8114)
#13 0x5564c81cd8bd in std::_Rb_tree<jami::Uri::Scheme, std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > >, std::_Select1st<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::clear() /usr/include/c++/9/bits/stl_tree.h:1271
#14 0x5564c81a5b91 in std::map<jami::Uri::Scheme, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> >, std::less<jami::Uri::Scheme>, std::allocator<std::pair<jami::Uri::Scheme const, std::unique_ptr<jami::ChannelHandlerInterface, std::default_delete<jami::ChannelHandlerInterface> > > > >::clear() /usr/include/c++/9/bits/stl_map.h:1133
#15 0x5564c8076b7c in jami::JamiAccount::shutdownConnections() jamidht/jamiaccount.cpp:303
#16 0x5564c79d1997 in jami::Manager::removeAccount(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) /foo/src/manager.cpp:2838
#17 0x5564c7971238 in wait_for_removal_of(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::chrono::duration<long, std::ratio<1l, 1l> >) /foo/test/unitTest/common.cpp:132
#18 0x5564c7756e9f in jami::test::ConversationTest::tearDown() conversation/conversation.cpp:505
#19 0x5564c796ca93 in CppUnit::TestCaller<jami::test::ConversationTest>::tearDown() /usr/include/cppunit/TestCaller.h:185
#20 0x7f3ed3b68614 in CppUnit::TestCaseMethodFunctor::operator()() const (/lib/x86_64-linux-gnu/libcppunit-1.15.so.1+0x24614)
#21 0x60b0000005bf (<unknown module>)
previously allocated by thread T2 here:
#0 0x7f3ed3c95587 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cc:104
#1 0x7f3ed2e7a8af in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::reserve(unsigned long) (/lib/x86_64-linux-gnu/libstdc++.so.6+0x1438af)
#2 0x5564c7742b6c in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy() /usr/include/c++/9/bits/shared_ptr_base.h:139
Thread T276 created by T133 here:
#0 0x7f3ed3bc0815 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cc:208
#1 0x7f3ed2e0e0c9 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd70c9)
#2 0x6220007e78ff (<unknown module>)
Thread T133 created by T34 here:
#0 0x7f3ed3bc0815 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cc:208
#1 0x7f3ed2e0e0c9 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd70c9)
#2 0x18b6f2262faf7bff (<unknown module>)
Thread T34 created by T2 here:
#0 0x7f3ed3bc0815 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cc:208
#1 0x7f3ed2e0e0c9 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd70c9)
#2 0x5564c9b9b003 in _IO_stdin_used (/foo/test/unitTest/ut_conversation+0x53a9003)
Thread T2 created by T0 here:
#0 0x7f3ed3bc0815 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cc:208
#1 0x7f3ed2e0e0c9 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd70c9)
#2 0x5564c7b7a95d in jami::ScheduledExecutor::ScheduledExecutor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /foo/src/scheduled_executor.cpp:36
#3 0x5564c7997626 in jami::Manager::ManagerPimpl::ManagerPimpl(jami::Manager&) /foo/src/manager.cpp:455
#4 0x5564c7a1cb6f in std::_MakeUniq<jami::Manager::ManagerPimpl>::__single_object std::make_unique<jami::Manager::ManagerPimpl, jami::Manager&>(jami::Manager&) (/foo/test/unitTest/ut_conversation+0x322ab6f)
#5 0x5564c799f539 in jami::Manager::Manager() /foo/src/manager.cpp:754
#6 0x5564c799f11d in jami::Manager::instance() /foo/src/manager.cpp:727
#7 0x5564c7b74cf0 in libjami::init(libjami::InitFlag) /foo/src/ring_api.cpp:69
#8 0x5564c77490d1 in jami::test::ConversationTest::setUp() conversation/conversation.cpp:223
#9 0x5564c796c9a7 in CppUnit::TestCaller<jami::test::ConversationTest>::setUp() /usr/include/cppunit/TestCaller.h:180
#10 0x7f3ed3b68614 in CppUnit::TestCaseMethodFunctor::operator()() const (/lib/x86_64-linux-gnu/libcppunit-1.15.so.1+0x24614)
#11 0x60b0000005bf (<unknown module>)
SUMMARY: AddressSanitizer: heap-use-after-free ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:790 in __interceptor_memcpy
Shadow bytes around the buggy address:
0x0c088001bdf0: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fd
0x0c088001be00: fa fa fd fd fd fd fd fa fa fa 00 00 00 00 00 fa
0x0c088001be10: fa fa fd fd fd fd fd fa fa fa fa fa fa fa fa fa
0x0c088001be20: fa fa 00 00 00 00 00 01 fa fa fd fd fd fd fd fa
0x0c088001be30: fa fa fd fd fd fd fd fa fa fa fa fa fa fa fa fa
=>0x0c088001be40: fa fa 00 00 00 00 00 00 fa fa[fd]fd fd fd fd fd
0x0c088001be50: fa fa fd fd fd fd fd fa fa fa fd fd fd fd fd fd
0x0c088001be60: fa fa fd fd fd fd fd fd fa fa fd fd fd fd fd fa
0x0c088001be70: fa fa fa fa fa fa fa fa fa fa fd fd fd fd fd fa
0x0c088001be80: fa fa 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
0x0c088001be90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
==20597==ABORTING