3 ms·
What does it catch under Rust? Unsafe code? I'm under the impression the borrow checker would prevent the class of problems valgrind is made for.
by er4hn 3y ago
What does it catch under Rust? Unsafe code? I'm under the impression the borrow checker would prevent the class of problems valgrind is made for.
- pornel 3y agoIn Rust it would catch the same kinds of buffer overflows and UAFs, but these rarely sneak past the compiler. However, it's handy for testing Rust wrappers for C libraries, because the FFI/ABI boundary is fragile and inherently unsafe.
- dralley 3y agoIt could probably catch some leaks. Rust doesn't make you immune to leaked memory.
- rwmj 3y agoI don't recall valgrind catching anything in Rust code right now, but do remember that we're binding to C libraries so it's still possible for them to leak; or as you say something inside an unsafe clause.