This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: memory leak in libgfortran
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Daniel Franke <franke dot daniel at gmail dot com>
- Cc: fortran at gcc dot gnu dot org
- Date: Thu, 14 Sep 2006 16:14:18 -0700
- Subject: Re: memory leak in libgfortran
- References: <200609132217.30405.franke.daniel@gmail.com>
On Wed, Sep 13, 2006 at 10:17:30PM +0200, Daniel Franke wrote:
>
> while checking for memory leaks in my own program, I found one
> in libgfortran (so I think). Please find a valgrind session log
> and the stripped down code below.
>
> The number of bytes lost depends on the initial length of:
> 45 CHARACTER(len=256) :: input
>
> The validation function and the SELECT CASE at line 29 are essential,
> if either is replaced, no memory is leaked.
>
> I can reproduce the leak using gfortran-4.1.1 and gfortran-4.2 (20060906).
>
> Shall I open a PR for this?
>
Daniel,
Please file a bug report. I'm guessing that gfortran
creates a temporary string/array to pass to a function
and then forgets to cleanup.
--
Steve