[Bug fortran/47296] I/O Segfault when running out of file descriptors
jvdelisle at frontier dot com
gcc-bugzilla@gcc.gnu.org
Sat Jan 15 15:23:00 GMT 2011
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 struct is set to 0 sometime before?
>
I had the same thought. I believe it is "zeroed" when the opp structure is
initialized...
at line 449 or so of open.c"
switch (flags->status)
{
case STATUS_SCRATCH:
if ((opp->common.flags & IOPARM_OPEN_HAS_FILE) == 0)
{
opp->file = NULL;
break;
}
More information about the Gcc-bugs
mailing list