www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2026/03/21/16:07:29

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 62LK7TYH1778671
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 62LK7TYH1778671
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=A0tVh1+R
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0C67F4BB58BD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1774123648;
bh=l2wGkwRQK82SPPC5bawLNUwT0cKh/e4Lp5gj9XABWBg=;
h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=A0tVh1+R1VO69OrTJ2WH10/otIgouXTJJL9cHxAjdVkxnp+TVChmoS4nYEGnr+ZA1
Wo9Gg0yuOZmlVOVtZcJGFLERMtvih+hIUaBz5gPExEjY0EJERzx0jCQbjamuUMOBi9
wsIeh3ow7/98A0/LVb5I4U53xv0Qc6wgspKGd7iU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A9FF4BB3BF6
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A9FF4BB3BF6
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774123628; cv=none;
b=n/vQZ8FLeBR1+JoaYrgdkIWHYFC/7ATQAdHh1VeG6GVSk62T5KfhSsP2+rKDO/eyclDRIIHxvgMYdh28Azcrg2WXovfIxZiiqqhYxi3sFMMF1W6glO7Cn/lGwVSAo59bZygZjWVjkdmpLYPgBP1ZNE9WzaqDYONU5qETXu3Dtoc=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1774123628; c=relaxed/simple;
bh=bRuQsduBW6hEGeTSdkLjYB/Nmw4vVchA4XdG9V8BZkY=;
h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;
b=va497BdLJ3cUXS+dBB2cJ8+JqkvS0UrpLeiCeL5VCI7l0hdwgWVm3be26n5lheaGcTeheb7cNK8a3o76+EZOb9W4Cd+2Nt5Hukknh7ZhBh318mLO0CvkUHWal/IDzukfvXptsq2vinKBfcylSMZvA9n0nVG98qzP9gNI4Ci5mnc=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A9FF4BB3BF6
To: cygwin AT cygwin DOT com
Subject: Re: std::mutex bug: Windows handle growth
In-Reply-To: <2d48a740-ce2b-4259-8947-f5c875dd1672@hvc.rr.com> (Frank Eskesen
via Cygwin's message of "Mon, 16 Mar 2026 17:39:49 -0400")
References: <2d48a740-ce2b-4259-8947-f5c875dd1672 AT hvc DOT rr DOT com>
Date: Sat, 21 Mar 2026 21:06:58 +0100
Message-ID: <87tsu97xr1.fsf@Gerda.invalid>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
X-purgate-server: smtpa08
X-purgate-type: clean
X-purgate: clean
X-purgate-size: 916
X-purgate-ID: 155817::1774123621-584606F6-8B08DA54/0/0
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: ASSI via Cygwin <cygwin AT cygwin DOT com>
Reply-To: ASSI <Stromeko AT nexgo DOT de>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

Frank Eskesen via Cygwin writes:
> I've run into a problem that occurs on Cygwin that doesn't occur on
> Linux systems: When a std::mutex is used, it doesn't clean up a
> Windows handle that it uses.

I've applied the fix provided by Corinna and built a test version on top
of the current gcc-13.4 snapshot.  Please test.

https://repo.or.cz/gcc/cygwin-gcc.git/commitdiff/f3429b7ec960fea9df62bc3c14e257d60fe436f0

The bug was already reported upstream a long time ago as FreeBSD also
has an implementation where the mutex can not be destroyed trivially:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71684

POSIX does not make such a guarantee, but there also is no feature test
macro, so it must eventually become a platform specific configuration.



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019