[patch, fortran, gcc] PR35063 [Regression wrt g77] I/O leaks handles/memory on Windows XP
Janne Blomqvist
blomqvist.janne@gmail.com
Sun Feb 10 18:12:00 GMT 2008
Andrew Pinski wrote:
> On Feb 8, 2008 3:42 PM, Jerry DeLisle <jvdelisle@verizon.net> wrote:
>> Ok to commit? I need a gcc maintainer to approve as well.
>
> It might be best if you created a __gthread_mutex_destroy_function for
> each of the gthr-* files and not do it via
> __GTHREAD_MUTEX_DESTROY_FUNCTION .
Something like the attached patch (just a null implementation in most
cases)? A null implementation shouldn't be worse than what we have now,
and can eventually be filled in by someone familiar with the relevant
API. A question about dce, tpf, and posix95: do they all have
posix_mutex_destroy, as the patch assumes? If one wants to play it safe,
I suppose one could use a null implementation for these 3 as well.
2008-02-08 Danny Smith <dannysmith@users.sourceforge.net>
Janne Blomqvist <jb@gcc.gnu.org>
PR gcc/35063
* gthr.h: Add __gthread_mutex_destroy as a function that must be
implemented.
* gthr-vxworks.h (__gthread_mutex_destroy): Null implementation.
* gthr-single.h (__gthread_mutex_destroy): Likewise.
* gthr-rtems.h (__gthread_mutex_destroy): Likewise.
* gthr-mipssde.h (__gthread_mutex_destroy): Likewise.
* gthr-nks.h (__gthread_mutex_destroy): Likewise.
* gthr-solaris.h (__gthread_mutex_destroy): Likewise.
* gthr-win32.h (__gthread_mutex_destroy_function): New function
to CloseHandle after unlocking to prevent accumulation of handle
count.
* gthr-dce.h (__gthread_mutex_destroy_function): Call
posix_mutex_destroy.
* gthr-tpf.h (__gthread_mutex_destroy_function): Likewise.
* gthr-posix.h (__gthread_mutex_destroy_function): Likewise.
* gthr-posix95.h (__gthread_mutex_destroy_function): Likewise.
2008-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/35063
* io/unit.c (delete_root): Call __gthread_mutex_destroy before
deallocating unit.
(free_internal_unit): Likewise.
(close_unit_1): Likewise.
--
Janne Blomqvist
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr35063-b.diff
Type: text/x-patch
Size: 7537 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080210/c685e285/attachment.bin>
More information about the Fortran
mailing list