This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: memory leak in libgfortran


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]