Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in 3rd party library #1048

Closed
even1024 opened this issue Feb 23, 2023 · 0 comments · Fixed by #1060
Closed

Memory leak in 3rd party library #1048

even1024 opened this issue Feb 23, 2023 · 0 comments · Fixed by #1060
Assignees
Labels

Comments

@even1024
Copy link
Collaborator

even1024 commented Feb 23, 2023

Address sanitizer detects the following issue during indigo api cpp tests:

7: ==3339==ERROR: LeakSanitizer: detected memory leaks
7: 
7: Direct leak of 256 byte(s) in 1 object(s) allocated from:
7:     #0 0x7fb3b82c2747 in malloc (/lib64/libasan.so.6+0xb4747)
7:     #1 0x7fb3b79c4109 in FcPatternObjectInsertElt (/lib64/libfontconfig.so.1+0x1f109)

Direct leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7fb357fe1712 in __interceptor_calloc ../../../../src/libsanitizer/lsan/lsan_interceptors.cpp:76
    #1 0x5643d5bd3c5f in CreateOneStructureINChI /home/muf/sources/Indigo/third_party/inchi/INCHI_BASE/src/runichi.c:1127
    #2 0x5643d5bd266d in ProcessOneStructure /home/muf/sources/Indigo/third_party/inchi/INCHI_BASE/src/runichi.c:319
    #3 0x5643d5bd7e18 in ProcessOneStructureExCore /home/muf/sources/Indigo/third_party/inchi/INCHI_BASE/src/runichi.c:2753
    #4 0x5643d5bd5f60 in ProcessOneStructureEx /home/muf/sources/Indigo/third_party/inchi/INCHI_BASE/src/runichi.c:2003
    #5 0x5643d5b37c07 in GetINCHI1 /home/muf/sources/Indigo/third_party/inchi/INCHI_API/libinchi/src/inchi_dll.c:637
    #6 0x5643d5b36fc0 in GetINCHI /home/muf/sources/Indigo/third_party/inchi/INCHI_API/libinchi/src/inchi_dll.c:279
    #7 0x5643d5a7df35 in indigo::InchiWrapper::saveMoleculeIntoInchi(indigo::Molecule&, indigo::Array<char>&) /home/muf/sources/Indigo/core/indigo-core/molecule/src/inchi_wrapper.cpp:636
    #8 0x7fb3577bc3da in indigoInchiGetInchi /home/muf/sources/Indigo/api/c/indigo-inchi/src/indigo_inchi_api.cpp:163
    #9 0x5643d599bbbf in IndigoApiInchiTest_basic_Test::TestBody() /home/muf/sources/Indigo/api/c/tests/unit/tests/inchi.cpp:60
    #10 0x5643d5b20fd3 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2599
    #11 0x5643d5b1945a in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2635
    #12 0x5643d5af563b in testing::Test::Run() /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2674
    #13 0x5643d5af60c2 in testing::TestInfo::Run() /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2853
    #14 0x5643d5af6a00 in testing::TestSuite::Run() /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:3012
    #15 0x5643d5b06777 in testing::internal::UnitTestImpl::RunAllTests() /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:5870
    #16 0x5643d5b22375 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2599
    #17 0x5643d5b1a550 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:2635
    #18 0x5643d5b04d6e in testing::UnitTest::Run() /home/muf/sources/Indigo/third_party/googletest/src/gtest.cc:5444
    #19 0x5643d59a63cf in RUN_ALL_TESTS() /home/muf/sources/Indigo/third_party/googletest/include/gtest/gtest.h:2293
    #20 0x5643d59a6351 in main /home/muf/sources/Indigo/api/c/tests/unit/main.cpp:6
    #21 0x7fb35683a082 in __libc_start_main ../csu/libc-start.c:308

@even1024 even1024 added the Bug label Feb 23, 2023
@even1024 even1024 added this to the Indigo-1.11.0-rc.1 milestone Feb 23, 2023
@even1024 even1024 self-assigned this Feb 23, 2023
@even1024 even1024 linked a pull request Mar 10, 2023 that will close this issue
even1024 added a commit that referenced this issue Mar 14, 2023
* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* smart pointer fix

* leaks

* ext

* clang issues

* lsan

* lsan

* docker fixes

* docker fixes

---------

Co-authored-by: Roman Porozhnetov <roman_porozhnetov@epam.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant