public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/55469] New: memory leak on read with istat.ne.0
@ 2012-11-26  7:57 Joost.VandeVondele at mat dot ethz.ch
  2012-11-26  8:01 ` [Bug fortran/55469] " Joost.VandeVondele at mat dot ethz.ch
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-11-26  7:57 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55469

             Bug #: 55469
           Summary: memory leak on read with istat.ne.0
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@mat.ethz.ch


The following testcase leads to memory leaks with gfortran 4.5/4.6/4.7/4.8 (as
found by valgrind) 4.1 seems not to leak (but has a couple of warnings).

REAL :: z
INTEGER :: istat
CHARACTER(LEN=3) :: t
t="NVE"
READ (UNIT=t,FMT=*,IOSTAT=istat) z
END

note that istat.NE.0 in this case.

==37422== 300 bytes in 1 blocks are definitely lost in loss record 1 of 1
==37422==    at 0x4A057F4: calloc (vg_replace_malloc.c:593)
==37422==    by 0x4C298FF: _gfortrani_xcalloc (memory.c:56)
==37422==    by 0x4CE2A82: l_push_char.isra.2 (list_read.c:641)
==37422==    by 0x4CE3223: read_real (list_read.c:1634)
==37422==    by 0x4CE504E: _gfortrani_list_formatted_read (list_read.c:1895)


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-10-04 10:09 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-26  7:57 [Bug fortran/55469] New: memory leak on read with istat.ne.0 Joost.VandeVondele at mat dot ethz.ch
2012-11-26  8:01 ` [Bug fortran/55469] " Joost.VandeVondele at mat dot ethz.ch
2012-11-26  9:27 ` burnus at gcc dot gnu.org
2012-11-26 10:24 ` burnus at gcc dot gnu.org
2012-11-28 14:58 ` matthias.krack at gmail dot com
2012-11-29 10:16 ` matthias.krack at gmail dot com
2012-11-29 10:23 ` Joost.VandeVondele at mat dot ethz.ch
2012-11-29 11:13 ` matthias.krack at gmail dot com
2012-11-29 11:40 ` burnus at gcc dot gnu.org
2013-02-07  5:58 ` Joost.VandeVondele at mat dot ethz.ch
2013-09-24  8:03 ` Joost.VandeVondele at mat dot ethz.ch
2013-10-01 20:52 ` burnus at gcc dot gnu.org
2013-10-04 10:06 ` burnus at gcc dot gnu.org
2013-10-04 10:09 ` burnus at gcc dot gnu.org
2013-10-04 10:09 ` burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).