From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D84F43870C2A; Fri, 15 Dec 2023 12:32:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D84F43870C2A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702643538; bh=fyRMoDEaFvLA6P4KOZQXR0ep0aU6m2M7HWgOIQ/ZeN0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UZrrGWaAjUPtuvR1b9jx65kX5X34kZRphjI/rj0gS28Ucdu6oW/oT7/IwC9mMyn+B 78ZXfZnnrcrhAxn23a6koigbXvbHfUbHC8wOab3xxqCAUTPx3OqA8XbqLHmNkvjm9M qLlYFjKUV4uc4891mlFtEgLpeN4c3MtOECkXwUOQ= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107857] recursive_mutex misses destructor if non-function call initialization is used Date: Fri, 15 Dec 2023 12:32:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107857 --- Comment #3 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > See also https://stackoverflow.com/a/77515095/981959 And my comment there: This seems like a bug in winpthreads. The INITIALIZER macro should not exis= t if destroying the mutex requires a function call. Either you need a function c= all to create it and destroy it, or you use the initializer macro and don't nee= d to do anything to destroy it.=