Happy birthday this 9th October to ...
Oct. 9th, 2007 09:07 pmApropos of nothing in particular, but in the category of Geeky Things I Thought Were Brilliant, comes something noted in passing in the comments thread to this Making Light post about the A&R letter to booksellers -- a bug in a program with no code at all:
#184 ::: Rob Landley ::: (view all by) ::: August 15, 2007, 01:34 PM:Quality. I used to use Irix at uni -- I wish I'd known about this so I could see if it worked in the version we had. :)
Christopher D (#95): I can top that. My friend Piggy (Lamont Yarroll) once reported a bug in a zero byte program.
One of the old Unixes (irix?) used an empty file with the executable bit set as its implementation of the program "true". The system thought it was a shell script, loaded it, ran it (which did nothing), returned success. Clever, eh?
Except it didn't _quite_ do nothing. When running a new shell script, the shell reads and executes the script in /etc/profile first,to set up the environment. Now what happens if you use this version of "true" in /etc/profile? It caused an endless loop, spawning processes recursively until memory filled up.
Piggy noted that this was an infinite bug density. One bug in zero bytes of code.
Lyrics: Ah yes -- the last one was the Beatles classic A Day in the Life -- the fade-out track from Sgt Pepper in 1967. And since it's a favourite of mine, I was glad to discover that a lot of people knew it --
So having had a Beatles track, I guess the obvious next step is ...
I live in an apartment on the ninety-ninth floor of my block
And I sit at home looking out the window
Imagining the world has stopped
Then in flies a guy who's all dressed up like a Union Jack
And says, I've won five pounds if I have his kind of detergent pack (1960s)