Live data from Hacker News

Ask HN: Please help me recall a certain programmer horror story

news.ycombinator.com

1–10 of 44 posts

Ask HN: Please help me recall a certain programmer horror story

#1
I remember having read a story about a programmer that encountered a weird error - his program was spitting out racial slurs in its output. The issue turned out to be a malicious version of the compiler, but somehow after removing it it got back to the system, and what should take only a few minutes turned into days and days of trying to find the culprit.

I've been searching long and hard but cannot seem to find it. I hope that what little I remember from it is enough and some kind soul will help me find the original article online... :)

Re: Ask HN: Please help me recall a certain programmer horror story

#6
post #2

https://www.quora.com/What-is-a-coders-worst-nightmare/answe...

Thank you! I saw Ken Thomson's classic Reflections on Trusting Trust linked on HN a couple weeks ago, and was looking forward to rereading this very same story when I was surprised to discover it wasn't and had never been part of that essay at all. I had no idea where to find the actual story I'd been looking for! (Indeed, I was no longer sure this story had actually existed, and wasn't just something my brain had made up from cobbling together fragmentary memories)

Thank you for solving this mystery. :)

Re: Ask HN: Please help me recall a certain programmer horror story

#8
post #2

https://www.quora.com/What-is-a-coders-worst-nightmare/answe...

> Because the compiler was poisoned with other source code that we didn't have. And that source code, that now existed only in the executable compiler, put those changes back into the compiler source before it compiled it.

I don't quite understand this part. How would this work?

Re: Ask HN: Please help me recall a certain programmer horror story

#9
post #2

https://www.quora.com/What-is-a-coders-worst-nightmare/answe...

> Because the compiler was poisoned with other source code that we didn't have. And that source code, that now existed only in the executable compiler, put those changes back into the compiler source before it compiled it. I don't quite understand this part. How would this work?

If I read it correctly, they used the binary compiler which existed on the machine to compile a new copy of the compiler (from clean source). This existing binary compiler was "poisoned" (modified) such that it would not only poison the psychiatrist's program, but also poison any attempts to compile a new copy of the compiler. So when they recompiled the compiler, the new copy was already poisoned (because they used the old, poisoned compiler to do it).

Re: Ask HN: Please help me recall a certain programmer horror story

#10
post #2

https://www.quora.com/What-is-a-coders-worst-nightmare/answe...

> Because the compiler was poisoned with other source code that we didn't have. And that source code, that now existed only in the executable compiler, put those changes back into the compiler source before it compiled it. I don't quite understand this part. How would this work?

You need a compiler to compile anything, including a compiler, so if your compiler was tampered with then anything you compile can be tampered with as well.

The only solution is be to download a binary compiler from someone you trust.

Post reply on HN