Re:Some mistakes Rust doesn't catch
by 10000truths on Tuesday February 08, 2022 @05:47AM
(#30256943)
MemorySanitizer will catch uninitialized variable errors.
[ Parent
| on HN ]
Re:Some mistakes Rust doesn't catch
by tialaramex on Tuesday February 08, 2022 @07:18AM
(#30257564)
The Sanitizers catch errors that happen when they're running
So in many situations the Sanitizer gives you a false sense of security that your code is correct because in the test environment, with the Sanitizer, it works, and then in Production, without a Sanitizer, under some circumstances it blows up because those circumstances never arose in your test environment.
Compare (safe) Rust which doesn't have uninitialized variables, and even WUFFS which doesn't have array bounds errors. In both cases the entire problem doesn't exist, programs which exhibit this problem are not valid programs in those languages, which is great because we did not mean to write these programs anyway. Hooray.