From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 6D6BD3858D28; Fri, 19 Jan 2024 14:28:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6D6BD3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1705674523; bh=9oKgFGq5oveqzeS2lVm4CpHv1yXCJ/6rqoob1ge0c1A=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=YxsgQDy6yh838juaabD3dChUAm+fqe2F5yTYUAFBuzMngw6NkQ1hJ5l6EtiLfizLA 6pKbU/WGpCwSfWaF1xqSrFTiTTJCjkpR1x/iLv1qGeDNi6S3+/M8BgCj/gEXHDdkdm H7lr2aFThvow5YNNzGBNoIUFbbJpmv32rls6xTYE= Received: by calimero.vinschen.de (Postfix, from userid 500) id D9705A8091C; Fri, 19 Jan 2024 15:28:40 +0100 (CET) Date: Fri, 19 Jan 2024 15:28:40 +0100 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Possiblly bug of cygwin1.dll Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20240119224436.876a055f356f7c6796bc725b@nifty.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240119224436.876a055f356f7c6796bc725b@nifty.ne.jp> List-Id: On Jan 19 22:44, Takashi Yano via Cygwin wrote: > Hi, > > I might find the bug of cygwin1.dll (including 3.4.x, 3.5.0 (TEST)). > The following test case (c++ code) causes handle leak. > > This issue is reproducible with both g++ and clang++. > However, it does not happen in Linux environment. > So I guess this is the cygwin1.dlll bug. > > I looked into this problem a bit, and found number of event handle > increases every loop. > > I doubt pthread_mutex_xxx functions. > > #include > int func() { return 0; } > int main() > { > for (;;) { > std::future f = std::async(std::launch::async, func); > f.get(); > } > return 0; > } Can you create a plain C testcase from there? It's much easier to debug. Thanks, Corinna