logoalt Hacker News

voakbasda • yesterday at 4:34 PM • 2 replies • view on HN

Have you never experienced a bug that goes away from adding/removing a logging statement?

I recently restructure a logging module in a client’s project, and the resulting performance gains exposed all sort of race conditions.

Sometime all you get is an LED.


Replies

Zanfa • today at 8:27 AM

One time I had a register write that worked in release mode, but didn’t in debug. Ended up being an AVR timing requirement when configuring the oscillator or flash that expected the second write to happen at most N cycles after the first and debug mode just happened to add enough operations between the two lines of C to miss the window.

studog • yesterday at 6:29 PM

I had a bug triggered by adding a comment. :-(

➕ show 2 replies