The bug that hides from breakpoints
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A deep-dive debugging story from the KnightOS z80 assembly kernel project, where a graphical corruption bug consistently disappeared whenever a breakpoint was set. The root cause turned out to be a two-character typo in the kernel's getKey function — a missing 'z' in a conditional jump instruction — that caused the function to ignore keyboard hardware locks. This allowed a non-suspendable background thread to repeatedly launch the thread list while a key was held down, spawning multiple instances of it and corrupting the process table display. The bug only vanished under breakpoints because pausing execution gave the developer time to lift their finger from the key, eliminating the repeated key-press condition. The investigation took three weeks.
Sort: