Update guarantees of unwinding past an extern "C" function #887
Conversation
The current docs say it will abort, however that behavior was actually reverted in rust-lang/rust#48445 and is not what currently happens in stable.
Thanks for the PR! |
> **Note**: Currently, in nightly `rustc` the LLVM backend aborts the process | ||
> by executing an illegal instruction. However, this is not the behavior in stable. |
ehuss
Sep 28, 2020
Collaborator
We generally don't include notes about specific versions of the rustc compiler in the reference. I'm also not sure what this is referring to, since it no longer aborts on unwind.
We generally don't include notes about specific versions of the rustc compiler in the reference. I'm also not sure what this is referring to, since it no longer aborts on unwind.
with such ABIs causes the process to abort. | ||
Functions with an ABI that differs from `"Rust"` do not support unwinding in | ||
the exact same way that Rust does. Therefore, unwinding past the end of | ||
functions with such ABIs results in undefined behavior, and will differ between |
ehuss
Sep 28, 2020
Collaborator
Can you link undefined behavior
to behavior-considered-undefined.md
?
Can you link undefined behavior
to behavior-considered-undefined.md
?
Functions with an ABI that differs from `"Rust"` do not support unwinding in | ||
the exact same way that Rust does. Therefore, unwinding past the end of | ||
functions with such ABIs results in undefined behavior, and will differ between | ||
platforms and compiler editions. If you cannot guarantee this will not happen, |
ehuss
Sep 28, 2020
Collaborator
I'm not sure what "compiler editions" means here. "Edition" has a specific meaning in Rust, and I don't think that is what is being referred to here. I think it would be fine to end the sentence at "undefined behavior", with the link leading the reader to understanding what that means.
I'm not sure what "compiler editions" means here. "Edition" has a specific meaning in Rust, and I don't think that is what is being referred to here. I think it would be fine to end the sentence at "undefined behavior", with the link leading the reader to understanding what that means.
As prompted by discussion in rust-lang/rust#52652
The current docs say it will abort, however that behavior was actually reverted in rust-lang/rust#48445 and is not what currently happens in stable.