[Bug libfortran/98129] Failure on reading big chunk of /dev/urandom

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 4 12:50:05 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98129

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The problem seems to be that we assume that a short read is always
an EOF, in read_block_direct:

      if (unlikely ((ssize_t) nbytes != have_read_record))
        {
          /* Short read,  e.g. if we hit EOF.  For stream files,
           we have to set the end-of-file condition.  */
          hit_eof (dtp);
        }
      return;
    }


More information about the Gcc-bugs mailing list