[Bug libstdc++/71684] Memory leak with std::mutex and std::lock_guard on freebsd
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 5 13:17:52 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71684
--- Comment #11 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes but for std::mutex we currently have no user-provided destructor if the
INIT macro is supported. If we add a ~__mutex_base() that unconditionally uses
__gthread_mutex_destroy that might be an ABI change for some targets. I don't
think it matters for the Itanium ABI because std::mutex isn't copyable so can't
be passed as an argument anyway.
More information about the Gcc-bugs
mailing list