External Publication
Visit Post

Code bloat caused by lack of nounwind attr on `drop_in_place`

Rust Internals [Unofficial] April 15, 2026
Source

I am surprised that LLVM doesn't seem to deduce "nounwind" itself. Maybe it's because drop_slow has external linkage and gets unwind tables generated, so LLVM can't trust it won't be replaced by the linker with a different function that unwinds? but I don't see LTO making a difference.

It should be beneficial to have a MIR opt pass that marks functions as "nounwind" if they don't call any potentially-unwinding functions themselves.

Discussion in the ATmosphere

Loading comments...