host cache invalid read after free reported by valgrind and tsan - not MT related
read after heap free
I believe this is related to the fact that we keep a reference of an iterator while deleting (invalidating) it.
valgrind:
--9629-- REDIR: 0x81a0720 (libc.so.6:__strnlen_avx2) redirected to 0x4c32c90 (strnlen)
profiling:/home/razvan/isc/git/kea-work/ext/gtest/libgtest_a-gtest-all.gcda:Version mismatch - expected A75* got A74*
==9629==
==9629== HEAP SUMMARY:
==9629== in use at exit: 0 bytes in 0 blocks
==9629== total heap usage: 9,420 allocs, 9,420 frees, 845,980 bytes allocated
==9629==
==9629== All heap blocks were freed -- no leaks are possible
==9629==
==9629== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==9629==
==9629== 1 errors in context 1 of 1:
==9629== Invalid read of size 8
==9629== at 0x1F3253: hash_value<isc::dhcp::Host> (shared_ptr.hpp:1153)
==9629== by 0x1F3253: operator() (extensions.hpp:262)
==9629== by 0x1F3253: find<boost::shared_ptr<isc::dhcp::Host>, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > > (hashed_index.hpp:1527)
==9629== by 0x1F3253: find<boost::shared_ptr<isc::dhcp::Host>, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > > (hashed_index.hpp:482)
==9629== by 0x1F3253: find<boost::shared_ptr<isc::dhcp::Host> > (hashed_index.hpp:471)
==9629== by 0x1F3253: isc::host_cache::HostCacheImpl::remove(boost::shared_ptr<isc::dhcp::Host> const&) (host_cache_impl.cc:458)
==9629== by 0x1F3623: isc::host_cache::HostCacheImpl::del6[abi:cxx11](unsigned int const&, isc::asiolink::IOAddress const&) (host_cache_impl.cc:397)
==9629== by 0x1E1153: isc::host_cache::HostCache::cacheRemoveHandler(isc::hooks::CalloutHandle&) (host_cache.cc:887)
==9629== by 0x19F669: (anonymous namespace)::removeHandler(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&) (command_unittests.cc:324)
==9629== by 0x1D0505: operator()<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&> > (bind.hpp:309)
==9629== by 0x1D0505: operator()<isc::hooks::CalloutHandle&> (bind.hpp:1306)
==9629== by 0x1D0505: boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >, int, isc::hooks::CalloutHandle&>::invoke(boost::detail::function::function_buffer&, isc::hooks::CalloutHandle&) (function_template.hpp:138)
==9629== by 0x1A90EB: operator() (function_template.hpp:760)
==9629== by 0x1A90EB: (anonymous namespace)::CommandTest::checkCommand(boost::function<int (isc::hooks::CalloutHandle&)>, boost::shared_ptr<isc::data::Element const>, int, int, boost::shared_ptr<isc::data::Element const>) [clone .isra.222] (command_unittests.cc:143)
==9629== by 0x1AA653: (anonymous namespace)::CommandTest::checkCommand(boost::function<int (isc::hooks::CalloutHandle&)>, boost::shared_ptr<isc::data::Element const>, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) [clone .isra.225] (command_unittests.cc:177)
==9629== by 0x1AC198: (anonymous namespace)::CommandTest_global_Test::TestBody() (command_unittests.cc:905)
==9629== by 0x2DFF79: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2608)
==9629== by 0x2DFF79: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2644)
==9629== by 0x2CA8FB: testing::Test::Run() (gtest.cc:2683)
==9629== by 0x2CAC3C: testing::TestInfo::Run() (gtest.cc:2860)
==9629== by 0x2CD170: testing::TestSuite::Run() (gtest.cc:3014)
==9629== Address 0x1060ff10 is 48 bytes inside a block of size 120 free'd
==9629== at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9629== by 0x1F3096: deallocate (new_allocator.h:125)
==9629== by 0x1F3096: deallocate_node (multi_index_container.hpp:536)
==9629== by 0x1F3096: erase_ (multi_index_container.hpp:761)
==9629== by 0x1F3096: final_erase_ (index_base.hpp:259)
==9629== by 0x1F3096: erase (ord_index_impl.hpp:351)
==9629== by 0x1F3096: isc::host_cache::HostCacheImpl::removeResv6(boost::shared_ptr<isc::dhcp::Host> const&) (host_cache_impl.cc:88)
==9629== by 0x1F3249: isc::host_cache::HostCacheImpl::remove(boost::shared_ptr<isc::dhcp::Host> const&) (host_cache_impl.cc:455)
==9629== by 0x1F3623: isc::host_cache::HostCacheImpl::del6[abi:cxx11](unsigned int const&, isc::asiolink::IOAddress const&) (host_cache_impl.cc:397)
==9629== by 0x1E1153: isc::host_cache::HostCache::cacheRemoveHandler(isc::hooks::CalloutHandle&) (host_cache.cc:887)
==9629== by 0x19F669: (anonymous namespace)::removeHandler(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&) (command_unittests.cc:324)
==9629== by 0x1D0505: operator()<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&> > (bind.hpp:309)
==9629== by 0x1D0505: operator()<isc::hooks::CalloutHandle&> (bind.hpp:1306)
==9629== by 0x1D0505: boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >, int, isc::hooks::CalloutHandle&>::invoke(boost::detail::function::function_buffer&, isc::hooks::CalloutHandle&) (function_template.hpp:138)
==9629== by 0x1A90EB: operator() (function_template.hpp:760)
==9629== by 0x1A90EB: (anonymous namespace)::CommandTest::checkCommand(boost::function<int (isc::hooks::CalloutHandle&)>, boost::shared_ptr<isc::data::Element const>, int, int, boost::shared_ptr<isc::data::Element const>) [clone .isra.222] (command_unittests.cc:143)
==9629== by 0x1AA653: (anonymous namespace)::CommandTest::checkCommand(boost::function<int (isc::hooks::CalloutHandle&)>, boost::shared_ptr<isc::data::Element const>, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) [clone .isra.225] (command_unittests.cc:177)
==9629== by 0x1AC198: (anonymous namespace)::CommandTest_global_Test::TestBody() (command_unittests.cc:905)
==9629== by 0x2DFF79: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2608)
==9629== by 0x2DFF79: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2644)
==9629== by 0x2CA8FB: testing::Test::Run() (gtest.cc:2683)
==9629== Block was alloc'd at
==9629== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9629== by 0x1F25D7: allocate (new_allocator.h:111)
==9629== by 0x1F25D7: allocate_node (multi_index_container.hpp:530)
==9629== by 0x1F25D7: insert_ (index_base.hpp:117)
==9629== by 0x1F25D7: insert_<boost::multi_index::detail::rvalue_tag> (ord_index_impl.hpp:716)
==9629== by 0x1F25D7: insert_<boost::multi_index::detail::rvalue_tag> (ord_index_impl.hpp:716)
==9629== by 0x1F25D7: insert_<boost::multi_index::detail::rvalue_tag> (multi_index_container.hpp:558)
==9629== by 0x1F25D7: insert_rv_ (multi_index_container.hpp:575)
==9629== by 0x1F25D7: final_insert_rv_ (index_base.hpp:221)
==9629== by 0x1F25D7: insert (ord_index_impl.hpp:302)
==9629== by 0x1F25D7: isc::host_cache::HostCacheImpl::insertResv6(boost::shared_ptr<isc::dhcp::Host> const&) (host_cache_impl.cc:38)
==9629== by 0x1F5F1C: isc::host_cache::HostCacheImpl::insert(boost::shared_ptr<isc::dhcp::Host const> const&, bool) (host_cache_impl.cc:342)
==9629== by 0x1DC52D: isc::host_cache::HostCache::insert(boost::shared_ptr<isc::dhcp::Host const> const&, bool) (host_cache.cc:312)
==9629== by 0x1AAE07: (anonymous namespace)::CommandTest_global_Test::TestBody() (command_unittests.cc:869)
==9629== by 0x2DFF79: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2608)
==9629== by 0x2DFF79: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2644)
==9629== by 0x2CA8FB: testing::Test::Run() (gtest.cc:2683)
==9629== by 0x2CAC3C: testing::TestInfo::Run() (gtest.cc:2860)
==9629== by 0x2CD170: testing::TestSuite::Run() (gtest.cc:3014)
==9629== by 0x2CDBC0: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:5598)
==9629== by 0x2DF6A9: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2608)
==9629== by 0x2DF6A9: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2644)
==9629== by 0x2C98F4: testing::UnitTest::Run() (gtest.cc:5185)
==9629==
==9629== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
tsan:
WARNING: ThreadSanitizer: heap-use-after-free (pid=4979)
Read of size 8 at 0x7b20000068b0 by main thread:
#0 unsigned long boost::hash_value<isc::dhcp::Host>(boost::shared_ptr<isc::dhcp::Host> const&) /usr/include/boost/smart_ptr/shared_ptr.hpp:1153 (host_cache_unittests+0xa2680)
#1 boost::hash<boost::shared_ptr<isc::dhcp::Host> >::operator()(boost::shared_ptr<isc::dhcp::Host> const&) const /usr/include/boost/functional/hash/extensions.hpp:262 (host_cache_unittests+0xa2680)
#2 boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::Host>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > > > >, boost::multi_index::detail::hashed_unique_tag>, boost::multi_index::detail::bucket_array<std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::multi_index::detail::hashed_index_global_iterator_tag> boost::multi_index::detail::hashed_index<boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> >, boost::multi_index::detail::nth_layer<2, boost::shared_ptr<isc::dhcp::Host>, boost::multi_index::indexed_by<boost::multi_index::random_access<boost::multi_index::tag<isc::host_cache::HostRandomIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, boost::multi_index::hashed_unique<boost::multi_index::tag<isc::host_cache::HostHashedIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, mpl_::na, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostIdentifierIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::dhcp::Host, boost::multi_index::const_mem_fun<isc::dhcp::Host, std::vector<unsigned char, std::allocator<unsigned char> > const&, &(isc::dhcp::Host::getIdentifier() const)>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::dhcp::Host::IdentifierType, &(isc::dhcp::Host::getIdentifierType() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostAddress4IndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::asiolink::IOAddress const&, &(isc::dhcp::Host::getIPv4Reservation() const)>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::mpl::v_item<isc::host_cache::HostHashedIndexTag, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::hashed_unique_tag>::find<boost::shared_ptr<isc::dhcp::Host>, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > >(boost::shared_ptr<isc::dhcp::Host> const&, boost::hash<boost::shared_ptr<isc::dhcp::Host> > const&, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > const&, mpl_::bool_<false>) const /usr/include/boost/multi_index/hashed_index.hpp:1527 (host_cache_unittests+0xa2680)
#3 boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::Host>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > > > >, boost::multi_index::detail::hashed_unique_tag>, boost::multi_index::detail::bucket_array<std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::multi_index::detail::hashed_index_global_iterator_tag> boost::multi_index::detail::hashed_index<boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> >, boost::multi_index::detail::nth_layer<2, boost::shared_ptr<isc::dhcp::Host>, boost::multi_index::indexed_by<boost::multi_index::random_access<boost::multi_index::tag<isc::host_cache::HostRandomIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, boost::multi_index::hashed_unique<boost::multi_index::tag<isc::host_cache::HostHashedIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, mpl_::na, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostIdentifierIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::dhcp::Host, boost::multi_index::const_mem_fun<isc::dhcp::Host, std::vector<unsigned char, std::allocator<unsigned char> > const&, &(isc::dhcp::Host::getIdentifier() const)>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::dhcp::Host::IdentifierType, &(isc::dhcp::Host::getIdentifierType() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostAddress4IndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::asiolink::IOAddress const&, &(isc::dhcp::Host::getIPv4Reservation() const)>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::mpl::v_item<isc::host_cache::HostHashedIndexTag, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::hashed_unique_tag>::find<boost::shared_ptr<isc::dhcp::Host>, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > >(boost::shared_ptr<isc::dhcp::Host> const&, boost::hash<boost::shared_ptr<isc::dhcp::Host> > const&, std::equal_to<boost::shared_ptr<isc::dhcp::Host> > const&) const /usr/include/boost/multi_index/hashed_index.hpp:482 (host_cache_unittests+0xa2680)
#4 boost::multi_index::detail::hashed_index_iterator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<boost::shared_ptr<isc::dhcp::Host>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > > > >, boost::multi_index::detail::hashed_unique_tag>, boost::multi_index::detail::bucket_array<std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::multi_index::detail::hashed_index_global_iterator_tag> boost::multi_index::detail::hashed_index<boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, boost::hash<boost::shared_ptr<isc::dhcp::Host> >, std::equal_to<boost::shared_ptr<isc::dhcp::Host> >, boost::multi_index::detail::nth_layer<2, boost::shared_ptr<isc::dhcp::Host>, boost::multi_index::indexed_by<boost::multi_index::random_access<boost::multi_index::tag<isc::host_cache::HostRandomIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na> >, boost::multi_index::hashed_unique<boost::multi_index::tag<isc::host_cache::HostHashedIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::identity<boost::shared_ptr<isc::dhcp::Host> >, mpl_::na, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostIdentifierIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::dhcp::Host, boost::multi_index::const_mem_fun<isc::dhcp::Host, std::vector<unsigned char, std::allocator<unsigned char> > const&, &(isc::dhcp::Host::getIdentifier() const)>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::dhcp::Host::IdentifierType, &(isc::dhcp::Host::getIdentifierType() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::HostAddress4IndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::dhcp::Host, isc::asiolink::IOAddress const&, &(isc::dhcp::Host::getIPv4Reservation() const)>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<boost::shared_ptr<isc::dhcp::Host> > >, boost::mpl::v_item<isc::host_cache::HostHashedIndexTag, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::hashed_unique_tag>::find<boost::shared_ptr<isc::dhcp::Host> >(boost::shared_ptr<isc::dhcp::Host> const&) const /usr/include/boost/multi_index/hashed_index.hpp:471 (host_cache_unittests+0xa2680)
#5 isc::host_cache::HostCacheImpl::remove(boost::shared_ptr<isc::dhcp::Host> const&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache_impl.cc:456 (host_cache_unittests+0xa2680)
#6 isc::host_cache::HostCacheImpl::del6[abi:cxx11](unsigned int const&, isc::asiolink::IOAddress const&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache_impl.cc:395 (host_cache_unittests+0xa2d9b)
#7 isc::host_cache::HostCache::cacheRemoveHandler(isc::hooks::CalloutHandle&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache.cc:887 (host_cache_unittests+0x9316a)
#8 removeHandler /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:324 (host_cache_unittests+0x567bd)
#9 int boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> >::operator()<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&> >(boost::_bi::type<int>, int (*&)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&>&, long) /usr/include/boost/bind/bind.hpp:309 (host_cache_unittests+0x7be1c)
#10 int boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >::operator()<isc::hooks::CalloutHandle&>(isc::hooks::CalloutHandle&) /usr/include/boost/bind/bind.hpp:1306 (host_cache_unittests+0x7be1c)
#11 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >, int, isc::hooks::CalloutHandle&>::invoke(boost::detail::function::function_buffer&, isc::hooks::CalloutHandle&) /usr/include/boost/function/function_template.hpp:138 (host_cache_unittests+0x7be1c)
#12 boost::function1<int, isc::hooks::CalloutHandle&>::operator()(isc::hooks::CalloutHandle&) const /usr/include/boost/function/function_template.hpp:760 (host_cache_unittests+0x5d1e9)
#13 checkCommand /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:143 (host_cache_unittests+0x5d1e9)
#14 checkCommand /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:177 (host_cache_unittests+0x622ed)
#15 TestBody /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:905 (host_cache_unittests+0x64059)
#16 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2608 (host_cache_unittests+0x176588)
#17 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2644 (host_cache_unittests+0x176588)
#18 testing::Test::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2683 (host_cache_unittests+0x1654c4)
#19 testing::TestInfo::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2860 (host_cache_unittests+0x1658c6)
#20 testing::TestSuite::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:3014 (host_cache_unittests+0x166533)
#21 testing::internal::UnitTestImpl::RunAllTests() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:5598 (host_cache_unittests+0x166e1f)
#22 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2608 (host_cache_unittests+0x176c94)
#23 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2644 (host_cache_unittests+0x176c94)
#24 testing::UnitTest::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:5185 (host_cache_unittests+0x165a59)
#25 RUN_ALL_TESTS() /home/razvan/isc/git/googletest/googletest//include/gtest/gtest.h:2482 (host_cache_unittests+0x2aeae)
#26 main /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/run_unittests.cc:16 (host_cache_unittests+0x2aeae)
Previous write of size 8 at 0x7b20000068b0 by main thread:
#0 operator delete(void*) <null> (libtsan.so.0+0x740cd)
#1 __gnu_cxx::new_allocator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > > >::deallocate(boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (host_cache_unittests+0xa0c95)
#2 boost::multi_index::multi_index_container<isc::host_cache::HostResrv6Tuple, boost::multi_index::indexed_by<boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::Resv6AddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<isc::host_cache::Resv6SubnetAddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::host_cache::HostResrv6Tuple, boost::multi_index::member<isc::host_cache::HostResrv6Tuple, unsigned int const, &isc::host_cache::HostResrv6Tuple::subnet_id_>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<isc::host_cache::HostResrv6Tuple> >::deallocate_node(boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > >*) /usr/include/boost/multi_index_container.hpp:536 (host_cache_unittests+0xa0c95)
#3 boost::multi_index::multi_index_container<isc::host_cache::HostResrv6Tuple, boost::multi_index::indexed_by<boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::Resv6AddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<isc::host_cache::Resv6SubnetAddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::host_cache::HostResrv6Tuple, boost::multi_index::member<isc::host_cache::HostResrv6Tuple, unsigned int const, &isc::host_cache::HostResrv6Tuple::subnet_id_>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<isc::host_cache::HostResrv6Tuple> >::erase_(boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > >*) /usr/include/boost/multi_index_container.hpp:761 (host_cache_unittests+0xa0c95)
#4 boost::multi_index::detail::index_base<isc::host_cache::HostResrv6Tuple, boost::multi_index::indexed_by<boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::Resv6AddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<isc::host_cache::Resv6SubnetAddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::host_cache::HostResrv6Tuple, boost::multi_index::member<isc::host_cache::HostResrv6Tuple, unsigned int const, &isc::host_cache::HostResrv6Tuple::subnet_id_>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<isc::host_cache::HostResrv6Tuple> >::final_erase_(boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > >*) /usr/include/boost/multi_index/detail/index_base.hpp:259 (host_cache_unittests+0xa0c95)
#5 boost::multi_index::detail::ordered_index_impl<boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, std::less<isc::asiolink::IOAddress const>, boost::multi_index::detail::nth_layer<1, isc::host_cache::HostResrv6Tuple, boost::multi_index::indexed_by<boost::multi_index::ordered_non_unique<boost::multi_index::tag<isc::host_cache::Resv6AddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, mpl_::na>, boost::multi_index::ordered_unique<boost::multi_index::tag<isc::host_cache::Resv6SubnetAddressIndexTag, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, boost::multi_index::composite_key<isc::host_cache::HostResrv6Tuple, boost::multi_index::member<isc::host_cache::HostResrv6Tuple, unsigned int const, &isc::host_cache::HostResrv6Tuple::subnet_id_>, boost::multi_index::const_mem_fun<isc::host_cache::HostResrv6Tuple, isc::asiolink::IOAddress const&, &(isc::host_cache::HostResrv6Tuple::getKey() const)>, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>, mpl_::na>, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>, std::allocator<isc::host_cache::HostResrv6Tuple> >, boost::mpl::v_item<isc::host_cache::Resv6AddressIndexTag, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::ordered_non_unique_tag, boost::multi_index::detail::null_augment_policy>::erase(boost::multi_index::detail::bidir_node_iterator<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<isc::host_cache::HostResrv6Tuple, std::allocator<isc::host_cache::HostResrv6Tuple> > > > >) /usr/include/boost/multi_index/detail/ord_index_impl.hpp:351 (host_cache_unittests+0xa0c95)
#6 isc::host_cache::HostCacheImpl::removeResv6(boost::shared_ptr<isc::dhcp::Host> const&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache_impl.cc:88 (host_cache_unittests+0xa0c95)
#7 isc::host_cache::HostCacheImpl::remove(boost::shared_ptr<isc::dhcp::Host> const&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache_impl.cc:455 (host_cache_unittests+0xa2678)
#8 isc::host_cache::HostCacheImpl::del6[abi:cxx11](unsigned int const&, isc::asiolink::IOAddress const&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache_impl.cc:395 (host_cache_unittests+0xa2d9b)
#9 isc::host_cache::HostCache::cacheRemoveHandler(isc::hooks::CalloutHandle&) /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/host_cache.cc:887 (host_cache_unittests+0x9316a)
#10 removeHandler /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:324 (host_cache_unittests+0x567bd)
#11 int boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> >::operator()<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&> >(boost::_bi::type<int>, int (*&)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::rrlist1<isc::hooks::CalloutHandle&>&, long) /usr/include/boost/bind/bind.hpp:309 (host_cache_unittests+0x7be1c)
#12 int boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >::operator()<isc::hooks::CalloutHandle&>(isc::hooks::CalloutHandle&) /usr/include/boost/bind/bind.hpp:1306 (host_cache_unittests+0x7be1c)
#13 boost::detail::function::function_obj_invoker1<boost::_bi::bind_t<int, int (*)(boost::shared_ptr<isc::host_cache::HostCache>, isc::hooks::CalloutHandle&), boost::_bi::list2<boost::_bi::value<boost::shared_ptr<isc::host_cache::HostCache> >, boost::arg<1> > >, int, isc::hooks::CalloutHandle&>::invoke(boost::detail::function::function_buffer&, isc::hooks::CalloutHandle&) /usr/include/boost/function/function_template.hpp:138 (host_cache_unittests+0x7be1c)
#14 boost::function1<int, isc::hooks::CalloutHandle&>::operator()(isc::hooks::CalloutHandle&) const /usr/include/boost/function/function_template.hpp:760 (host_cache_unittests+0x5d1e9)
#15 checkCommand /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:143 (host_cache_unittests+0x5d1e9)
#16 checkCommand /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:177 (host_cache_unittests+0x622ed)
#17 TestBody /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/command_unittests.cc:905 (host_cache_unittests+0x64059)
#18 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2608 (host_cache_unittests+0x176588)
#19 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2644 (host_cache_unittests+0x176588)
#20 testing::Test::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2683 (host_cache_unittests+0x1654c4)
#21 testing::TestInfo::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2860 (host_cache_unittests+0x1658c6)
#22 testing::TestSuite::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:3014 (host_cache_unittests+0x166533)
#23 testing::internal::UnitTestImpl::RunAllTests() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:5598 (host_cache_unittests+0x166e1f)
#24 bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2608 (host_cache_unittests+0x176c94)
#25 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/razvan/isc/git/googletest/googletest/src/gtest.cc:2644 (host_cache_unittests+0x176c94)
#26 testing::UnitTest::Run() /home/razvan/isc/git/googletest/googletest/src/gtest.cc:5185 (host_cache_unittests+0x165a59)
#27 RUN_ALL_TESTS() /home/razvan/isc/git/googletest/googletest//include/gtest/gtest.h:2482 (host_cache_unittests+0x2aeae)
#28 main /home/razvan/isc/git/kea-review/premium/src/hooks/dhcp/host_cache/tests/run_unittests.cc:16 (host_cache_unittests+0x2aeae)
SUMMARY: ThreadSanitizer: heap-use-after-free /usr/include/boost/smart_ptr/shared_ptr.hpp:1153 in unsigned long boost::hash_value<isc::dhcp::Host>(boost::shared_ptr<isc::dhcp::Host> const&)
I prefer the fix in the comments, not the one in the MR. I'll update the MR if there is no issue with the second fix.
Edited by Razvan Becheriu