#40649: Memory leak at std::recursive_mutex destruction Open Date: 2020-08-19 17:39 Last Update: 2020-09-02 15:39 URL for this Ticket: https://osdn.net//projects/mingw/ticket/40649 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40649 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2020-09-02 15:39 Updated by: keith * Status Update from Open to Closed * Resolution Update from None to Invalid Comment: You clearly are not using MinGW.org products, so what makes you think we should help with this? Built by MinGW-W64 project) This rogue project blatantly, and illegally, infringes our legally registered trademark -- it is, in no way, associated with MinGW.org --------------------------------------------------------------------- Ticket Status: Reporter: godbille Owner: (None) Type: Issues Status: Closed Priority: 5 - Medium MileStone: (None) Component: GCC Severity: 7 Resolution: Invalid --------------------------------------------------------------------- Ticket details: Hello, I have a memory leak when a std::recursive_mutex object is deleted. This memory leak happens only if the recursive_mutex has been at least locked once. Here is a short code to reproduce the problem : #include <mutex> #include <thread> int main(int argc, char *argv[]) { while(true) { std::recursive_mutex mu; mu.lock(); std::this_thread::sleep_for(std::chrono::milliseconds(1)); mu.unlock(); } return 0; } ############################################################################### ###### Here is my GCC version : ###################################################### ########## Using built-in specs. COLLECT_GCC=C:\QtUpdate\Tools\mingw730_64\bin\gcc.exe COLLECT_LTO_WRAPPER=C:/QtUpdate/Tools/mingw730_64/bin/../libexec/gcc/ x86_64-w64-mingw32/7.3.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../../../src/gcc-7.3.0/configure --host=x86_64-w64-mingw32 --build= x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot =/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes --enable-threads=posix --enable-libgomp --enable-libatomic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=core2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw730/prerequisites/ x86_64-w64-mingw32-static --with-mpfr=/c/mingw730/prerequisites/ x86_64-w64-mingw32-static --with-mpc=/c/mingw730/prerequisites/ x86_64-w64-mingw32-static --with-isl=/c/mingw730/prerequisites/ x86_64-w64-mingw32-static --with-pkgversion='x86_64-posix-seh-rev0, Built by MinGW-W64 project' --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/ mingw64/opt/include -I/c/mingw730/prerequisites/x86_64-zlib-static/include -I/c /mingw730/prerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw730/x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I /c/mingw730/prerequisites/x86_64-zlib-static/include -I/c/mingw730/ prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw730/ x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/include -I/c/mingw730/prerequisites /x86_64-zlib-static/include -I/c/mingw730/prerequisites/ x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ident -L/c/mingw730/ x86_64-730-posix-seh-rt_v5-rev0/mingw64/opt/lib -L/c/mingw730/prerequisites/ x86_64-zlib-static/lib -L/c/mingw730/prerequisites/x86_64-w64-mingw32-static/ lib ' Thread model: posix gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) ############################################################################### # My binutils version : ######################################################### ####### GNU ld (GNU Binutils) 2.30 ############################################################################### # My build environment : ######################################################## ##### MINGW64_NT-6.1 NBFR7021 2.5.0(0.295/5/3) 2016-03-31 18:47 x86_64 Msys ############################################################################### # -- Ticket information of MinGW - Minimalist GNU for Windows project MinGW - Minimalist GNU for Windows Project is hosted on OSDN Project URL: https://osdn.net/projects/mingw/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/mingw/ticket/40649 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=40649