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

Investigate possible memory leaks #178

Open
scharlton2 opened this issue Oct 26, 2024 · 0 comments
Open

Investigate possible memory leaks #178

scharlton2 opened this issue Oct 26, 2024 · 0 comments

Comments

@scharlton2
Copy link
Contributor

ctest -S cmemcheck.cmake -VV --output-on-failure -j
Results

PostProcessTest memcheck results for : TestRM

100% tests passed, 0 tests failed out of 3

Total Test time (real) = 362.90 sec
-- Processing memory checking output:
1/3 MemCheck: #2: TestBMIdtor ...................... Defects: 1
2/3 MemCheck: #1: TestRMdtor ....................... Defects: 1
3/3 MemCheck: #3: TestRM ........................... Defects: 8
MemCheck log files can be found here: (<#> corresponds to test number)
/home/charlton/source/repos/coupled/phreeqcrm/_cmemcheck/Testing/Temporary/MemoryChecker.<#>.log
Memory checking results:
Memory Leak - 2
Potential Memory Leak - 8

MemoryChecker.1.log

==7466== 128 bytes in 1 blocks are still reachable in loss record 1 of 1
==7466== at 0x484DCD3: realloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7466== by 0x48BB8AC: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7466== by 0x48CE184: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7466== by 0x48B9FE1: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7466== by 0x400647D: call_init.part.0 (dl-init.c:70)
==7466== by 0x4006567: call_init (dl-init.c:33)
==7466== by 0x4006567: _dl_init (dl-init.c:117)
==7466== by 0x40202C9: ??? (in /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)
==7466==

MemoryChecker.2.log

==7467== 128 bytes in 1 blocks are still reachable in loss record 1 of 1
==7467== at 0x484DCD3: realloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7467== by 0x48BB8AC: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7467== by 0x48CE184: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7467== by 0x48B9FE1: ??? (in /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0)
==7467== by 0x400647D: call_init.part.0 (dl-init.c:70)
==7467== by 0x4006567: call_init (dl-init.c:33)
==7467== by 0x4006567: _dl_init (dl-init.c:117)
==7467== by 0x40202C9: ??? (in /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2)
==7467==

MemoryChecker.3.log 1 of 97

==7468== 16 bytes in 1 blocks are indirectly lost in loss record 1 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x488AAD9: YAML::detail::memory::create_node() (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x49A5D1: YAML::detail::memory_holder::create_node() (memory.h:38)
==7468== by 0x49ADCE: YAML::Node::EnsureNodeExists() const (impl.h:63)
==7468== by 0x49C2A5: YAML::Node YAML::Node::operator[]<char [4]>(char const (&) [4]) (impl.h:337)
==7468== by 0x4975E7: YAMLPhreeqcRM::YAMLSetGridCellCount(int) (YAMLPhreeqcRM.cpp:342)
==7468== by 0x4931CD: YAMLSetGridCellCount (YAML_interface_C.cpp:423)
==7468== by 0x149128: TestAllMethods_c (TestAllMethods_c.c:48)
==7468== by 0x13FED6: main (main.cpp:87)
==7468==

MemoryChecker.3.log 2 of 97

==7468== 16 bytes in 1 blocks are indirectly lost in loss record 2 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x488AAD9: YAML::detail::memory::create_node() (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x49A5D1: YAML::detail::memory_holder::create_node() (memory.h:38)
==7468== by 0x49BD3E: YAML::Node::Node<char const*>(char const* const&) (impl.h:35)
==7468== by 0x4A6914: YAML::convert<char [4]>::encode(char const*) (convert.h:87)
==7468== by 0x4A4830: YAML::detail::node& YAML::detail::node_data::convert_to_node<char [4]>(char const (&) [4], std::shared_ptrYAML::detail::memory_holder) (impl.h:227)
==7468== by 0x4A125D: YAML::detail::node& YAML::detail::node_data::get<char [4]>(char const (&) [4], std::shared_ptrYAML::detail::memory_holder) (impl.h:168)
==7468== by 0x49FD26: YAML::detail::node& YAML::detail::node_ref::get<char [4]>(char const (&) [4], std::shared_ptrYAML::detail::memory_holder) (node_ref.h:68)
==7468== by 0x49DFE8: YAML::detail::node& YAML::detail::node::get<char [4]>(char const (&) [4], std::shared_ptrYAML::detail::memory_holder) (node.h:135)
==7468== by 0x49C2D7: YAML::Node YAML::Node::operator[]<char [4]>(char const (&) [4]) (impl.h:338)
==7468== by 0x4975E7: YAMLPhreeqcRM::YAMLSetGridCellCount(int) (YAMLPhreeqcRM.cpp:342)
==7468== by 0x4931CD: YAMLSetGridCellCount (YAML_interface_C.cpp:423)
==7468== by 0x149128: TestAllMethods_c (TestAllMethods_c.c:48)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log 7 of 97

==7468== 16 bytes in 1 blocks are indirectly lost in loss record 7 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x49AD9B: YAML::Node::EnsureNodeExists() const (impl.h:62)
==7468== by 0x49B2D3: YAML::Node::push_back(YAML::Node const&) (impl.h:311)
==7468== by 0x497661: YAMLPhreeqcRM::YAMLSetGridCellCount(int) (YAMLPhreeqcRM.cpp:344)
==7468== by 0x4931CD: YAMLSetGridCellCount (YAML_interface_C.cpp:423)
==7468== by 0x149128: TestAllMethods_c (TestAllMethods_c.c:48)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log 15 of 97

==7468== 16 bytes in 1 blocks are indirectly lost in loss record 15 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x4888FB5: ??? (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x488C5F2: YAML::detail::node_data::push_back(YAML::detail::node&, std::shared_ptrYAML::detail::memory_holder const&) (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x49A793: YAML::detail::node_ref::push_back(YAML::detail::node&, std::shared_ptrYAML::detail::memory_holder) (node_ref.h:55)
==7468== by 0x49ABB0: YAML::detail::node::push_back(YAML::detail::node&, std::shared_ptrYAML::detail::memory_holder) (node.h:115)
==7468== by 0x49B315: YAML::Node::push_back(YAML::Node const&) (impl.h:314)
==7468== by 0x499D6D: YAMLPhreeqcRM::YAMLThreadCount(int) (YAMLPhreeqcRM.cpp:586)
==7468== by 0x4941F0: YAMLThreadCount (YAML_interface_C.cpp:736)
==7468== by 0x149140: TestAllMethods_c (TestAllMethods_c.c:49)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log 33 of 97

==7468== 24 bytes in 1 blocks are indirectly lost in loss record 33 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x4A0A15: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_countYAML::detail::memory*(YAML::detail::memory*) (shared_ptr_base.h:596)
==7468== by 0x49F12C: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_countYAML::detail::memory*(YAML::detail::memory*, std::integral_constant<bool, false>) (shared_ptr_base.h:607)
==7468== by 0x49D779: std::__shared_ptr<YAML::detail::memory, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<YAML::detail::memory, void>(YAML::detail::memory*) (shared_ptr_base.h:1099)
==7468== by 0x49B8CA: std::shared_ptrYAML::detail::memory::shared_ptr<YAML::detail::memory, void>(YAML::detail::memory*) (shared_ptr.h:160)
==7468== by 0x49A5A2: YAML::detail::memory_holder::memory_holder() (memory.h:36)
==7468== by 0x49ADAA: YAML::Node::EnsureNodeExists() const (impl.h:62)
==7468== by 0x49B2D3: YAML::Node::push_back(YAML::Node const&) (impl.h:311)
==7468== by 0x497661: YAMLPhreeqcRM::YAMLSetGridCellCount(int) (YAMLPhreeqcRM.cpp:344)
==7468== by 0x4931CD: YAMLSetGridCellCount (YAML_interface_C.cpp:423)
==7468== by 0x149128: TestAllMethods_c (TestAllMethods_c.c:48)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log 91 of 97

==7468== 192 (128 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 91 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x49A09F: YAMLPhreeqcRMLib::CreateYAMLPhreeqcRM() (YAMLPhreeqcRM.cpp:615)
==7468== by 0x490E0C: CreateYAMLPhreeqcRM (YAML_interface_C.cpp:10)
==7468== by 0x14910D: TestAllMethods_c (TestAllMethods_c.c:46)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log 97 of 97

==7468== 4,879 (48 direct, 4,831 indirect) bytes in 1 blocks are definitely lost in loss record 97 of 97
==7468== at 0x4849013: operator new(unsigned long) (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==7468== by 0x48994E3: ??? (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x488A80A: YAML::detail::memory::merge(YAML::detail::memory const&) (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x488A883: YAML::detail::memory_holder::merge(YAML::detail::memory_holder&) (in /usr/lib/x86_64-linux-gnu/libyaml-cpp.so.0.7.0)
==7468== by 0x49B34F: YAML::Node::push_back(YAML::Node const&) (impl.h:315)
==7468== by 0x497661: YAMLPhreeqcRM::YAMLSetGridCellCount(int) (YAMLPhreeqcRM.cpp:344)
==7468== by 0x4931CD: YAMLSetGridCellCount (YAML_interface_C.cpp:423)
==7468== by 0x149128: TestAllMethods_c (TestAllMethods_c.c:48)
==7468== by 0x13FED6: main (main.cpp:87)

MemoryChecker.3.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant