Get the latest tech news
Differential Coverage for Debugging
Posted on Friday, April 25, 2025. I have been debugging some code I did not write and was reminded of this technique.
In the resulting profile, “covered” (green) means it ran in the failing test but not the passing ones, making it something to take a closer look at. Looking at the file list, only natmul.go has a non-zero coverage percentage, meaning it contains lines that are unique to the failing test. This code is where I inserted the bug: the else branch is missing za.neg = false, producing the-0x0 in the test failure.
Or read this on Hacker News