3 ms·
Why bugs might feel “impossible”
- ecpottinger 5y agoWriting a program for Haiku, the timing had to be very precise. The code work fine most of the time abut about one in a million runs (the code was in a tight loop) there would be a mis-timing. I went over the code time over time and could not find a problem. Finally, I added a timing counter to see what happened and then filter for the mis-timings. Turns out there were multiple interrupts happening, and each interrupt was short enough that it did not interfere with my program. But every now and then multiple interrupts occurred at the same time, and by the time they all got serviced the timing was way off. Solution, re-code the loop to be an interrupt too.
- aliasEli 5y agoA nice categorization of bugs. Most of them looked horribly familiar.