This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47296] I/O Segfault when running out of file descriptors
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Jan 2011 19:48:30 +0000
- Subject: [Bug fortran/47296] I/O Segfault when running out of file descriptors
- Auto-submitted: auto-generated
- References: <bug-47296-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47296
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 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 block, opp->file_len is used and
unpack_filename tries to read the string. However, accessing opp->file crashes
in
fstrlen.
It might work if one sets file_len to 0 in tempfile. But maybe something
cleverer can be done.