This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/35063] [Regression wrt g77] I/O leaks handles/memory on Windows XP
- From: "brian at dessent dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2008 21:17:05 -0000
- Subject: [Bug libfortran/35063] [Regression wrt g77] I/O leaks handles/memory on Windows XP
- References: <bug-35063-12481@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #20 from brian at dessent dot net 2008-02-07 21:17 -------
Subject: Re: I/O leaks handles/memory on Windows XP
> 1) __gthr_win32_mutex_init_function()
> - sets counter=-1
> - creates a semaphore (the windows handle!)
>
> 2)__gthr_win32_mutex_lock()
> - increments counter (now 0)
>
> 3) __gthr_win32_mutex_unlock()
> - decrements counter (now -1 again)
> - would release the semaphore, if counter >= 0 but doesn't...!
This gthr-win32 stuff should only be run if --enable-threads=win32.
That is not the case with Cygwin which should be using pthreads
(--enable-threads=posix). So if the above is really at fault then the
leak should not manifest on Cygwin at all.
Brian
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35063