From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 757CE3973037; Fri, 4 Dec 2020 12:40:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 757CE3973037 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/98129] Failure on reading big chunk of /dev/urandom Date: Fri, 04 Dec 2020 12:40:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2020 12:40:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98129 --- Comment #2 from Thomas Koenig --- The problem seems to be related to an early return from the read system cal= l: strace -e trace=3Dopen,read,close ./a.out read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\v\2\0\0\0\0\0"..., 832) =3D 832 close(3) =3D 0 close(3) =3D 0 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\217\0\0\0\0\0\0"..= ., 832) =3D 832 close(3) =3D 0 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260/\0\0\0\0\0\0"..= ., 832) =3D 832 close(3) =3D 0 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@*\0\0\0\0\0\0"..., = 832) =3D 832 close(3) =3D 0 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`D\2\0\0\0\0\0"..., = 832) =3D 832 close(3) =3D 0 read(3, ":\312\275\302\373|\204[c`\20\275\230\205\326@\255Mj\263-qd\336\30\300\2G\3= 26\215\333J"..., 40000000) =3D 33554431 At line 9 of file read.f90 Fortran runtime error: End of file Error termination. Backtrace: close(5) =3D 0 close(5) =3D 0 close(6) =3D 0 close(5) =3D 0 close(5) =3D 0 close(5) =3D 0 close(6) =3D 0 close(5) =3D 0 close(6) =3D 0 close(5) =3D 0 #0 0x7fd9847c572f in read_block_direct at ../../../trunk/libgfortran/io/transfer.c:664 #1 0x7fd9847c572f in unformatted_read at ../../../trunk/libgfortran/io/transfer.c:1127 #2 0x400bf3 in ??? #3 0x400c9c in ??? #4 0x7fd983a46349 in __libc_start_main at ../csu/libc-start.c:308 #5 0x400909 in ??? at ../sysdeps/x86_64/start.S:120 #6 0xffffffffffffffff in ??? close(4) =3D 0 close(3) =3D 0 +++ exited with 2 +++=