Re:Asterinas: OS kernel written in Rust and providing Linux-...
by rcxdude on Wednesday October 16, 2024 @08:10AM
(#41858152)
Valgrind can only tell you about issues that your testcases exercise. It doesn't provide the same guarantees as static checking of memory safety invariants. But, if you're really concerned (especially about unsafe code), belt-and-bracers is a good strategy, and valgrind will work with rust binaries as well. Rust also has a tool called MIRI which can similarly flag up issues in testcases (it's effectively an interpreter for the intermediate representation in the compiler, and it can detect undefined behaviour even if the compiled assembly would happen to look OK. Still has the same limitation of needing extensive testcases though)
Re:Asterinas: OS kernel written in Rust and providing Linux-...
by baq on Wednesday October 16, 2024 @06:26AM
(#41857484)
You probably should run your rust programs through valgrind regardless. Rust is safer than C, but any unsafe code drops you to approximately C level of safety and any C FFI calls are obviously outside of rust's control or responsibility.
Re:Asterinas: OS kernel written in Rust and providing Linux-...
by badmintonbaseba on Wednesday October 16, 2024 @06:19AM
(#41857436)
Valgrind is great, especially if you write extensive tests and you actually run them through it regularly. And even then, it does not prove the absence of any kind of bugs. Safe rust has strong guarantees.
Re:Asterinas: OS kernel written in Rust and providing Linux-...
by tracker1 on Wednesday October 16, 2024 @08:39AM
(#41858386)
A few years ago I was worrying on a Byzantine mess of a JS project. I converted everything to TS for the sole reason of somewhat safely refactoring the project as a whole.
There was so little trust in the fragility of the original, it took a few months to convince everyone the refactored TS branch was safe.
After that, feature development was a lot faster in terms of productivity again.
But what about tools like valgrind in context of C?