Myths and Legends about Integer Overflow in Rust

The status of detecting and avoiding integer overflow in Rust changed several times in the lead up to the 1.0.0 release last year. That fluid situation means there’s still quite a bit of confusion about exactly how overflow is handled and mitigated, and what the consequences are. So, I wrote a blog post to hopefully clarify!

10 Likes

The reason shrink-wrapping doesn't work the way you expect it to is 25614 – Offset in CFI directives for frameless indirect compact unwind is wrong when the prologue is not in the entry block; the version of LLVM Rust is using definitely supports shrink-wrapping on x86.

And the Reddit thread:

Thanks, I corrected that inaccuracy.