Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update guarantees of unwinding past an extern "C" function #887

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuriks
Copy link

@yuriks yuriks commented Sep 25, 2020

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.

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.
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Comment on lines +184 to +185
> **Note**: Currently, in nightly `rustc` the LLVM backend aborts the process
> by executing an illegal instruction. However, this is not the behavior in stable.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ehuss ehuss added the S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author. label Oct 11, 2021
@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

☔ The latest upstream changes (possibly bf115a4) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: The marked PR is awaiting some action (such as code changes) from the PR author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants