🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.4bsd-bugs
Article #11

f77, STOP, and /dev/null

#11
From: purduecak
Date: Thu, 03 Dec 1981 00:23
39 lines
1236 bytes
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
Technical Details
Message-ID: <anews.Apurdue.136>
Path: arc1-ca.pugleaf.net!utzoo!decvax!pur-ee!purdue!cak

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!decvax!pur-ee!purdue!cak
From: purdue!cak
Newsgroups: net.4bsd-bugs,net.v7bugs
Subject: f77, STOP, and /dev/null
Date: Thu, 03 Dec 1981 00:23:14 +0000
Message-ID: <anews.Apurdue.136>