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 StringPool code #1050

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

Memory leak in StringPool code #1050

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

Comments

@even1024
Copy link
Collaborator

Adress sanitizer reports the following leak:

6: ==3421==ERROR: AddressSanitizer: alloc-dealloc-mismatch (operator new vs free) on 0x602000636450
6: #0 0x7fdedda413f7 in free (/lib64/libasan.so.6+0xb43f7)
6: #1 0x7fdedca13806 in indigo::StringPool::~StringPool() (/github/workspace/build/bin/libindigo.so+0x2e7806)
6: #2 0x7fdedc9936f6 in std::unique_ptr<sf::safe_hide_obj<IndigoOptionManager, std::shared_timed_mutex, std::unique_lockstd::shared_timed_mutex, std::shared_lockstd::shared_timed_mutex >, std::default_delete<sf::safe_hide_obj<IndigoOptionManager, std::shared_timed_mutex, std::unique_lockstd::shared_timed_mutex, std::shared_lockstd::shared_timed_mutex > > >::~unique_ptr() (/github/workspace/build/bin/libindigo.so+0x2676f6)
6: #3 0x7fdedc98cd8d in indigoReleaseSessionId (/github/workspace/build/bin/libindigo.so+0x260d8d)
6: #4 0x67b1cc in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::)(), char const) (/github/workspace/build/bin/indigo-api-unit-tests+0x67b1cc)
6: #5 0x66c1dc in testing::TestInfo::Run() (/github/workspace/build/bin/indigo-api-unit-tests+0x66c1dc)
6: #6 0x66c71c in testing::TestSuite::Run() (/github/workspace/build/bin/indigo-api-unit-tests+0x66c71c)
6: #7 0x67218e in testing::internal::UnitTestImpl::RunAllTests() (/github/workspace/build/bin/indigo-api-unit-tests+0x67218e)
6: #8 0x66c2af in testing::UnitTest::Run() (/github/workspace/build/bin/indigo-api-unit-tests+0x66c2af)
6: #9 0x4f6cc0 in RUN_ALL_TESTS() /github/workspace/third_party/googletest/include/gtest/gtest.h:2293
6: #10 0x4f6cc0 in main /github/workspace/api/c/tests/unit/main.cpp:6
6: #11 0x7fdedbc4c554 in __libc_start_main (/lib64/libc.so.6+0x22554)
6: #12 0x4f8051 (/github/workspace/build/bin/indigo-api-unit-tests+0x4f8051)

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

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* stringpool fix

* smart pointer fix

* clang fixes

* disable cpp unittests

---------

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