upvote
Everyone knows that tests don't prevent all bugs. But they are very good at preventing known bugs from recurring in the future.
reply
I admit to curiosity as to whether static analysis could have caught this. E.g., Rust's type system (yeah yeah I know) catches all data races, unless they originate in unsafe code, which this one might or might not have; a hypothetical Rust SQLite would probably need a lot of unsafe (https://github.com/tursodatabase/turso has 556 unsafe blocks in the core), and I don't have a sense of whether the particular part that contained this bug would be included in that.
reply
It can prove absence of specific bugs though.
reply
Donald Knuth: Beware of bugs in the above code; I have only proved it correct, not tried it.
reply