Hacker News new | ask | show | jobs
by 1over137 1204 days ago
>In Rust debug builds, integer overflows crash

That's true with C/C++ compilers too, if you want, using UBSan.

1 comments

Unsigned integer overflow is not undefined behavior in C++ so won't be caught by UBSan.

Also, UBSan is more overhead than turning on Rust's overflow checking.