3 ms·
> by default you will build a "debug" binary which enables checked arithmetic The check failures trigger a panic? Is there any work to enable an ASan-like fea
by wyldfire 11y ago
> by default you will build a "debug" binary which enables checked arithmetic
The check failures trigger a panic?
Is there any work to enable an ASan-like feature for unsafe blocks BTW?
- Gankro 11y agoYes, they trigger a panic. No, there's no ASan. There isn't as strong a need for ASan in Rust because so little code is unsafe. Most of the time, the only reason you drop down to unsafe code is because you're trying to do something compilers are bad at tracking (or that is a pain in the neck to encode to a compiler). It's usually quite well-contained, as well. You can work with uninit memory, allocating and freeing memory, and index into arrays in Safe Rust without concern already (with everything but indexing statically validated). IMHO the kind of stuff `unsafe` is used for is very conducive to aggressive automated testing.