Apurdue.136
net.4bsd-bugs,net.v7bugs
utzoo!decvax!pur-ee!purdue!cak
Thu Dec  3 00:23:14 1981
f77, STOP, and /dev/null
Ok all you f77 fans, I've got one for you. The system engineer's dream;
a 5 line program that blows up. We were running a larger program that
normally produces a listing, and wanted to throw the listing away, so
we re-opened the unit number to /dev/null. The program did not work;
it got to a point and then started soaking the CPU. Changing the
argument to a regular disk file made it work just fine. The following
test program exhibits the bug:

       open(unit=8,file='/dev/null')
       write(8,1)
1       format('Missle Command')
       stop
       end

Here's an sdb dialog:

*r
(hit DEL)
interrupt at
read: address 0x3ea8
*t
read(0,27656,1024)
_filbuf(18756)
fread(2147479876,1,15,18756)
t_runc(19956)
f_clos(2147480064)
f_exit()
s_stop(17444,0)
MAIN_()   [null.f:4]
main(1,2147480304,2147480312)
*

Now, can you explain why the STOP routine is trying to read anything?
It appears to be looping, waiting to get something other than EOF
on the file.

This is on 4.0BSD.

Chris Kent

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.