public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/27360]  New: Memory leaks when reading logicals
@ 2006-04-29 23:48 eedelman at gcc dot gnu dot org
  2006-04-30  0:12 ` [Bug libfortran/27360] " jvdelisle at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: eedelman at gcc dot gnu dot org @ 2006-04-29 23:48 UTC (permalink / raw)
  To: gcc-bugs

It seems that the io library is leaking memory when reading logicals, as
demonstrated by the small program below; when running, the program uses more
and more memory until it's killed.  I don't see this behaviour with data types
other than logicals.

erik:/var/tmp$ cat memoryleak.f90 
program memoryleak

    implicit none
    logical :: foo
    integer :: ios

    ios = 0
    do while (ios == 0)
        read (*, *, iostat=ios) foo
    end do

end program memoryleak
erik:/var/tmp$ gfortran memoryleak.f90 
erik:/var/tmp$ awk 'BEGIN{while (1) print "F"}' | a.out
Killed


-- 
           Summary: Memory leaks when reading logicals
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eedelman at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2006-04-30 19:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-29 23:48 [Bug libfortran/27360] New: Memory leaks when reading logicals eedelman at gcc dot gnu dot org
2006-04-30  0:12 ` [Bug libfortran/27360] " jvdelisle at gcc dot gnu dot org
2006-04-30  1:15 ` jvdelisle at gcc dot gnu dot org
2006-04-30  3:19 ` jvdelisle at gcc dot gnu dot org
2006-04-30  3:20 ` patchapp at dberlin dot org
2006-04-30 18:05 ` eedelman at gcc dot gnu dot org
2006-04-30 19:53 ` jvdelisle at gcc dot gnu dot org
2006-04-30 19:55 ` jvdelisle at gcc dot gnu dot 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).