4 ms·
It's the "repro the bug" that's hard... When I worked on static analysis of codebases, the error handling codepath was the most likely source of problems.
by canucker2016 2y ago
It's the "repro the bug" that's hard...
When I worked on static analysis of codebases, the error handling codepath was the most likely source of problems.
- gavinhoward 2y agoYes. To do that, I fuzz like crazy, and every path becomes a test, even if it means a lot of manual work checking each one. That alone exercises tons of error paths. To cover 99% of the rest, I use SQLite's error injection [1] on all tests. Just doing error injection on allocation gets you 90% of the way there. [1]: https://sqlite.org/testing.html#anomaly_testing https://sqlite.org/testing.html#anomaly_testing