Bug #4930
closedPotential memory leak on Ubuntu
0%
Description
I tried to use Valgrind to check memory leak on Ubuntu 16.04. using ~/ndn-cxx/ndn-cxx/build$ valgrind --leak-check=yes ./unit-tests.
It showed that
==29582==
==29582== HEAP SUMMARY:
==29582== in use at exit: 93,747 bytes in 585 blocks
==29582== total heap usage: 18,287 allocs, 17,702 frees, 1,809,135 bytes allocated
==29582== LEAK SUMMARY:
==29582== definitely lost: 2,812 bytes in 13 blocks
==29582== indirectly lost: 2,855 bytes in 33 blocks
==29582== possibly lost: 0 bytes in 0 blocks
==29582== still reachable: 88,080 bytes in 539 blocks
==29582== suppressed: 0 bytes in 0 blocks
Updated by Davide Pesavento over 5 years ago
- Tracker changed from Task to Bug
- Subject changed from ndn-cxx potential memory leak on Ubuntu to Potential memory leak on Ubuntu
- Start date deleted (
05/18/2019)
You need to tell us:
- exact version of ndn-cxx
- how you compiled ndn-cxx (what flags, etc.)
Then re-run valgrind adding --track-origins=yes
and attach the full output, not just the summary.
Updated by Davide Pesavento over 5 years ago
- Status changed from New to Rejected
I cannot reproduce on Ubuntu 19.04 (valgrind 3.14.0) with ndn-cxx-0.6.6-8-g3510d299. Please provide the info requested above.
Updated by Yufeng Zhang over 5 years ago
icear-server:~/ndncert/build$ valgrind --leak-check=full --track-origins=yes ./unit-tests
==6845== Memcheck, a memory error detector
==6845== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==6845== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==6845== Command: ./unit-tests
==6845==
Running 38 test cases...
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-config.t.cpp(34): last checkpoint: "ReadConfigFileWithFileAnchor" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(39): last checkpoint: "Initialization" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(56): last checkpoint: "HandleProbe" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(88): last checkpoint: "HandleProbeInfo" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(121): last checkpoint: "HandleProbeUsingDefaultHandler" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(150): last checkpoint: "HandleNew" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/ca.conf.test: cannot open file
../tests/unit-tests/ca-module.t.cpp(188): last checkpoint: "HandleChallenge" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: ./tests/unit-tests/challenge-credential.conf.test: cannot open file
../tests/unit-tests/challenge-credential.t.cpp(35): last checkpoint
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: ./tests/unit-tests/challenge-credential.conf.test: cannot open file
../tests/unit-tests/challenge-credential.t.cpp(44): last checkpoint: "HandleChallengeRequest" test entry
sh: 1: ./tests/unit-tests/test-send-email.sh: not found
../tests/unit-tests/challenge-email.t.cpp(75): error: in "TestChallengeEmail/OnChallengeRequestWithEmail": check recipientEmail == "zhiyi@cs.ucla.edu" has failed [ != zhiyi@cs.ucla.edu]
../tests/unit-tests/challenge-email.t.cpp(77): error: in "TestChallengeEmail/OnChallengeRequestWithEmail": check secret == stored_secret has failed [ != 055352]
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/client.conf.test: cannot open file
../tests/unit-tests/client-config.t.cpp(31): last checkpoint: "ReadConfigFile" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/client.conf.test: cannot open file
../tests/unit-tests/client-config.t.cpp(47): last checkpoint: "AddAndRemoveCaItem" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/client.conf.test: cannot open file
../tests/unit-tests/client-module.t.cpp(36): last checkpoint: "ClientModuleInitialize" test entry
/usr/include/boost/property_tree/json_parser.hpp(73): fatal error: in "void boost::property_tree::json_parser::read_json(const string&, Ptree&, const std::locale&) [with Ptree = boost::property_tree::basic_ptree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >; std::__cxx11::string = std::__cxx11::basic_string<char>]": boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::property_tree::json_parser::json_parser_error> >: tests/unit-tests/client.conf.test: cannot open file
../tests/unit-tests/client-module.t.cpp(43): last checkpoint: "Probe" test entry
*** 15 failures are detected in the test module "NDNCERT Tests"
==6845==
==6845== HEAP SUMMARY:
==6845== in use at exit: 9,912 bytes in 270 blocks
==6845== total heap usage: 57,881 allocs, 57,611 frees, 8,687,985 bytes allocated
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 172 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x190662: ndn::ndncert::tests::TestCryptoHelper::Test0::test_method() (crypto-helper.t.cpp:42)
==6845== by 0x191AC7: ndn::ndncert::tests::TestCryptoHelper::Test0_invoker() (crypto-helper.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BD2C6A: boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 173 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x190777: ndn::ndncert::tests::TestCryptoHelper::Test0::test_method() (crypto-helper.t.cpp:47)
==6845== by 0x191AC7: ndn::ndncert::tests::TestCryptoHelper::Test0_invoker() (crypto-helper.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BD2C6A: boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 174 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x40F44D3: ndn::ndncert::ECDHState::deriveSecret(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (crypto-helper.cpp:179)
==6845== by 0x18F0BF: ndn::ndncert::tests::TestCryptoHelper::Test1::test_method() (crypto-helper.t.cpp:65)
==6845== by 0x18FE77: ndn::ndncert::tests::TestCryptoHelper::Test1_invoker() (crypto-helper.t.cpp:55)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 175 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x40F44D3: ndn::ndncert::ECDHState::deriveSecret(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (crypto-helper.cpp:179)
==6845== by 0x18F1DD: ndn::ndncert::tests::TestCryptoHelper::Test1::test_method() (crypto-helper.t.cpp:68)
==6845== by 0x18FE77: ndn::ndncert::tests::TestCryptoHelper::Test1_invoker() (crypto-helper.t.cpp:55)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 176 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x1994E2: ndn::ndncert::tests::TestEncTlv::Test0::test_method() (enc-tlv.t.cpp:41)
==6845== by 0x19B18C: ndn::ndncert::tests::TestEncTlv::Test0_invoker() (enc-tlv.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BD2C6A: boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 208 (40 direct, 168 indirect) bytes in 1 blocks are definitely lost in loss record 177 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA68E1: EC_POINT_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F42D1: ndn::ndncert::ECDHState::deriveSecret(unsigned char const*, int) (crypto-helper.cpp:161)
==6845== by 0x1995F7: ndn::ndncert::tests::TestEncTlv::Test0::test_method() (enc-tlv.t.cpp:44)
==6845== by 0x19B18C: ndn::ndncert::tests::TestEncTlv::Test0_invoker() (enc-tlv.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BF68D0: boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BD2C6A: boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 178 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x1903FB: ndn::ndncert::tests::TestCryptoHelper::Test0::test_method() (crypto-helper.t.cpp:33)
==6845== by 0x191AC7: ndn::ndncert::tests::TestCryptoHelper::Test0_invoker() (crypto-helper.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 179 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x190544: ndn::ndncert::tests::TestCryptoHelper::Test0::test_method() (crypto-helper.t.cpp:37)
==6845== by 0x191AC7: ndn::ndncert::tests::TestCryptoHelper::Test0_invoker() (crypto-helper.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 180 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x18EE18: ndn::ndncert::tests::TestCryptoHelper::Test1::test_method() (crypto-helper.t.cpp:57)
==6845== by 0x18FE77: ndn::ndncert::tests::TestCryptoHelper::Test1_invoker() (crypto-helper.t.cpp:55)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 181 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x18EF88: ndn::ndncert::tests::TestCryptoHelper::Test1::test_method() (crypto-helper.t.cpp:61)
==6845== by 0x18FE77: ndn::ndncert::tests::TestCryptoHelper::Test1_invoker() (crypto-helper.t.cpp:55)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 182 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x19927B: ndn::ndncert::tests::TestEncTlv::Test0::test_method() (enc-tlv.t.cpp:33)
==6845== by 0x19B18C: ndn::ndncert::tests::TestEncTlv::Test0_invoker() (enc-tlv.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== 1,444 (80 direct, 1,364 indirect) bytes in 1 blocks are definitely lost in loss record 183 of 183
==6845== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6845== by 0x6C0E4B8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BA5E8E: EC_KEY_new_method (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6BAA99F: ??? (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x6C07A92: EVP_PKEY_keygen (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
==6845== by 0x40F38EE: ndn::ndncert::ECDHState::ECDHState() (crypto-helper.cpp:87)
==6845== by 0x1993C4: ndn::ndncert::tests::TestEncTlv::Test0::test_method() (enc-tlv.t.cpp:37)
==6845== by 0x19B18C: ndn::ndncert::tests::TestEncTlv::Test0_invoker() (enc-tlv.t.cpp:31)
==6845== by 0x5BC82CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC777C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845== by 0x5BC7FDC: boost::execution_monitor::vexecute(boost::function<void ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1)
==6845==
==6845== LEAK SUMMARY:
==6845== definitely lost: 720 bytes in 12 blocks
==6845== indirectly lost: 9,192 bytes in 258 blocks
==6845== possibly lost: 0 bytes in 0 blocks
==6845== still reachable: 0 bytes in 0 blocks
==6845== suppressed: 0 bytes in 0 blocks
==6845==
==6845== For counts of detected and suppressed errors, rerun with: -v
==6845== ERROR SUMMARY: 12 errors from 12 contexts (suppressed: 0 from 0)
Updated by Davide Pesavento over 5 years ago
Look at the stack traces... all leaked allocations come from ndncert, not ndn-cxx. I don't understand why you think this is an ndn-cxx bug. The leaks are in ndncert (as LeakSanitizer already reported).