Categories
Computing

Day 7-and the bug was…

For Day 1, go here. The series is tagged advent-2025.

As I noted earlier, I discovered a bug in the interrupt handling for Yarg when I opened and started to use box 3. This was a bit dispiriting, because I thought I had tested interrupts (and had tests for them).

Getting into the bug, it seemed familiar – much like a regression I’ve had before (when I had fewer tests) where a repeating interrupt differed from a one-off.

That didn’t seem to be the problem though, and in fact two similar interrupts behaved differently.

Looking further, the problem became clear. When I was preparing an interrupt for a repeat, I was only accounting for simple call frames. My advent code used more local variables, and revealed the bug.

I’ll make a new release with this fix in it, and then it will be time for box 4!