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

           Summary: I/O Segfault when running out of file descriptors
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
                CC: jvdeli...@gcc.gnu.org


Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/8843f2317cb565cd#

On Linux, I need to use either much higher numbers (> 1024) or set the number
of file descriptors down using, e.g.   ulimit -S -n 20

Valgrind then shows:

 Begin assignment unit
  ** try to connect chosen unit =           27
==26968== Warning: invalid file descriptor 25 in syscall open()
==26968== Use of uninitialised value of size 8
==26968==    at 0x4EFC6BF: _gfortrani_new_unit (open.c:509)
==26968==    by 0x4EFC994: _gfortran_st_open (open.c:702)
==26968==    by 0x400BF5: assignunit.1532 (hj4.f90:38)

Reply via email to