FS#45051 - [valgrind] Valgrind reports unfreed memory for C++ programs
Attached to Project:
Arch Linux
Opened by Lukas Wagner (ValidUser) - Friday, 22 May 2015, 20:56 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 21 December 2017, 13:28 GMT
Opened by Lukas Wagner (ValidUser) - Friday, 22 May 2015, 20:56 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 21 December 2017, 13:28 GMT
|
Details
Description:
Valgrind reports unfreed memory for all C++-programs that are linked against the standard library. I believe this issue was introduced after I updated from glibc 2.21-3 to 2.21-4 (I tested this scenario on my laptop that still has 2.21-2 - no issue there) I could not reproduce the same issue for C programs. Valgrind output: ==13793== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1 ==13793== at 0x4C29F90: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13793== by 0x4EC01EF: pool (eh_alloc.cc:117) ==13793== by 0x4EC01EF: __static_initialization_and_destruction_0 (eh_alloc.cc:244) ==13793== by 0x4EC01EF: _GLOBAL__sub_I_eh_alloc.cc (eh_alloc.cc:307) ==13793== by 0x400F0E9: call_init.part.0 (in /usr/lib/ld-2.21.so) ==13793== by 0x400F1FA: _dl_init (in /usr/lib/ld-2.21.so) ==13793== by 0x4000DB9: ??? (in /usr/lib/ld-2.21.so) ==13793== ==13793== LEAK SUMMARY: ==13793== definitely lost: 0 bytes in 0 blocks ==13793== indirectly lost: 0 bytes in 0 blocks ==13793== possibly lost: 0 bytes in 0 blocks ==13793== still reachable: 72,704 bytes in 1 blocks ==13793== suppressed: 0 bytes in 0 blocks Additional info: * package version(s) glibc 2.21-4 gcc 5.1.0-4 valgrind 3.10.1-2 Steps to reproduce: Write simple C++ program (e.g. Hello World) Compile with g++ main.cpp -o main Run Valgrind: valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes ./main |
This task depends upon
Closed by Levente Polyak (anthraxx)
Thursday, 21 December 2017, 13:28 GMT
Reason for closing: Fixed
Additional comments about closing: we have gcc 7.2.1-2, this is fixed in 6 already
Thursday, 21 December 2017, 13:28 GMT
Reason for closing: Fixed
Additional comments about closing: we have gcc 7.2.1-2, this is fixed in 6 already
I just reported it upstream: https://bugs.kde.org/show_bug.cgi?id=348978