Possiblly bug of cygwin1.dll

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jan 19 14:28:40 GMT 2024


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 <future>
> int func() { return 0; }
> int main()
> {
>   for (;;) {
>     std::future<int> 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


More information about the Cygwin mailing list