I spent at least one week of clicking-time tracking a weird bug in the new "action log" subsystem of clicker ... It first appeared as a "loop" in a bidirectionnal list of buffers. Of course i immediately thought of a buffer overflow but all the checks i could imagine were guaranteeing that buffer limits were respected.
Then i went into more and more "invariant" checks, making sure the list was correct and reporting the actual number of entries, making sure that all the entries were allocated where they were supposed to be, etc. no much more success.
But at least, i managed to track down the bug to some deterministic point where the list was broken ... and since no operation were performed with the list between the last time it was seen correct and the first time it was seen wrong, i thought of an overflow again.
After a whole evening of "x /16xw 0x3e0000" or "x /64cb 0x3e0000" analysis using QEMU, it revealed that there was indeed an overflow ... because the initial size of the array was wrongly defined
"and it feeeels liiiike i'm seventeeen agaaaain" ::)


