Oct. 9th, 2007

snorkackcatcher: (Default)


Apropos 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:

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.
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. :)

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 -- [livejournal.com profile] lavenderdusk, [livejournal.com profile] a_t_rain, [livejournal.com profile] muggle_prof, [livejournal.com profile] nineveh_uk, [livejournal.com profile] golden_d, and [livejournal.com profile] parthenia14.

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)

Profile

snorkackcatcher: (Default)
snorkackcatcher

January 2020

S M T W T F S
   1 234
567891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 22nd, 2026 05:29 am
Powered by Dreamwidth Studios