Reply to post: So much fun....

You've seen things people wouldn't believe – so tell us your programming horrors

hugo tyson
Coat

So much fun....

Once we shipped some embedded software as a relocatable binary to a customer. It needed to be started with some workspace memory. They were getting nowhere. So I went to Japan, and spent two days working out how the hell to debug/single-step in their useless environment, to find they had started it giving it the memory where the code was, as its own workspace. It ran just fine, initialising its memory, until it shot itself in the head by overwriting the code that was doing the initialising...

In PostScript, double-slash is a meaningful token, prefix to a name for immediate evaluation. It's used a lot in the bootstrap, itself written in PS, of a PostScript-compatible interpreter. Trivial example

/inc { 1 //add } def

For one reason or another, the bootstrap source was macro pre-processed. This was fine until the C-preprocessor - for it was he! - enabled C++ comments by default. Most of the bootstrap disappeared.

Re. sweary messages and customers: in the 1980s, at Acorn, I wrote tests for the very first ARM CPUs, even before we had silicon back - to check the various emulators, and to test in simulation the chip layout before tape-out, to test the chips when they came back. One said - or rather didn't, because it worked OK - "Shifter fucked!" in the error case. This was all lovely, and the same unit tests were still used 10-15 years later by ARM. They even shipped them to customers (making their own ARMs) as binaries. This was lovely too. Until one customer somehow managed to make chips whose shifter was not entirely correct...

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon