[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-22 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 Jerry DeLisle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-16 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #11 from Jerry DeLisle 2011-01-17 05:59:15 UTC --- No more segfault on Cygwin, it should be good. Thanks.

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-16 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #10 from Janne Blomqvist 2011-01-16 20:12:55 UTC --- Well, I was thinking more something like the patch I just posted at http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01086.html

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-16 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #9 from Jerry DeLisle 2011-01-16 08:29:55 UTC --- After getting Win7-cygwin build of gcc latest trunk built, I was able to do some more testing. I could then reproduce another segfault. As Janne suggested and I certainly agree, the

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-15 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #8 from Janne Blomqvist 2011-01-15 19:31:17 UTC --- I suppose one thing that could be done is to set opp->file and opp->file_len regardless of whether mkstemp() succeeds or not, that is lines 1987:1093 in unix.c, and then in open.c:ne

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-15 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #7 from Jerry DeLisle 2011-01-15 18:16:33 UTC --- Unpatched on Cygwin on Windows 7, I do not get the segfault. I also do not get the OS error. The assign error mechanism of the test case picks up that there is a problem. The windows

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-15 Thread jvdelisle at frontier dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #6 from jvdelisle at frontier dot com 2011-01-15 14:51:00 UTC --- > Just to be sure, I suspect it would be prudent to set opp->file to NULL and > opp->file_len to 0 in tempfile() in case fd< 0. Or are we sure that the > entire > opp s

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-15 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 Janne Blomqvist changed: What|Removed |Added CC||jb at gcc dot gnu.org --- Comment #5 fr

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-14 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #4 from Jerry DeLisle 2011-01-15 06:42:33 UTC --- Author: jvdelisle Date: Sat Jan 15 06:42:30 2011 New Revision: 168832 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168832 Log: 2011-01-14 Jerry DeLisle PR libgfortran

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-14 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #3 from Jerry DeLisle 2011-01-15 06:33:15 UTC --- This is easy enough and if you study the code path, it makes sense. The error flag returned here is passed up the call chain where an "os" error is generated. When attempting to open

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-14 Thread jvdelisle at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 Jerry DeLisle changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug fortran/47296] I/O Segfault when running out of file descriptors

2011-01-14 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296 --- Comment #1 from Tobias Burnus 2011-01-14 19:48:26 UTC --- The problems seems to be that opp->file is not set for scratch files (STATUS_SCRATCH) when tempfile fails. Thus, open_external just returns. Then, in new_unit in the error handling bl