-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 catch_unwind
doc comments for c_unwind
#128321
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
@rustbot author |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
This comment has been minimized.
This comment has been minimized.
c22415e
to
ca2b294
Compare
@rustbot ready |
There are merge commits (commits with multiple parents) in your changes. We have a no merge policy so these commits will need to be removed for this pull request to be merged. You can start a rebase with the following commands:
The following commits are merge commits: |
0718c3c
to
39acc84
Compare
@rust-lang/libs I think we need some official sign-off of some sort on this, because it provides a new guarantee that wasn't part of the initial RFC. If there's agreement that this should be merged, can we also backport it to beta in time for the 1.81 release, so that the documentation will be correct in time for the full stabilization of |
New guarantees should be considered by @rust-lang/libs-api. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
a8a1d8e
to
59f6f9f
Compare
I don't see anything about an "entrypoint" in the standard library, but I may just not know what to look for. The other place that might make sense to document this would be, I guess, in the new |
This comment has been minimized.
This comment has been minimized.
Yeah, the reference docs is the best place I can think of for this right now. |
a9bd7ba
to
4ba514c
Compare
@RalfJung The other PR mentioned unwinding past |
4ba514c
to
efd8c46
Compare
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
@tgross35 There are now only two commits; do you need me to squash again before merge? |
It's up to whoever approves this, and officially we have no history requirements. But it's always good to avoid making a change in one commit and then immediately undoing/modifying that change in another commit within the same PR, so I would probably squash (history/blame/bisect gets significantly harder to understand otherwise - nbd here, just good practice). Also, you can drop the |
C-unwind was added in Rust 1.71, and allows panicking/unwinding /exceptions across foreign function interfaces. Additionally, Rust decided to let handling of foreign unwinds be implementation defined behavior (instead of undefined), so we can now mark `throw` as safe, see rust-lang/rust#128321. This has a cost in that we now have landing pads on every message send; this is strictly the correct choice, though, so we will have to bear with it. Fixes #539.
C-unwind was added in Rust 1.71, and allows panicking/unwinding /exceptions across foreign function interfaces. Additionally, Rust decided to let handling of foreign unwinds be implementation defined behavior (instead of undefined), so we can now mark `throw` as safe, see rust-lang/rust#128321. This has a cost in that we now have landing pads on every message send; this is strictly the correct choice, though, so we will have to bear with it. Fixes #539.
C-unwind was added in Rust 1.71, and allows panicking/unwinding /exceptions across foreign function interfaces. Additionally, Rust decided to let handling of foreign unwinds be implementation defined behavior (instead of undefined), so we can now mark `throw` as safe, see rust-lang/rust#128321. This has a cost in that we now have landing pads on every message send; this is strictly the correct choice, though, so we will have to bear with it. Fixes #539.
C-unwind was added in Rust 1.71, and allows panicking/unwinding /exceptions across foreign function interfaces. Additionally, Rust decided to let handling of foreign unwinds be implementation defined behavior (instead of undefined), so we can now mark `throw` as safe, see rust-lang/rust#128321. This has a cost in that we now have landing pads on every message send; this is strictly the correct choice, though, so we will have to bear with it. Fixes #539.
I think https://github.com/rust-lang/rust/pull/128321/files#r1750418130 is still unresolved -- it would make sense to me to clarify that behavior in this PR. |
efd8c46
to
bd7c2e6
Compare
@Mark-Simulacrum resolved. @tgross35 That was added automatically by GH. 😆 Removed; thank you. |
Documentation comments for `catch_unwind` and `thread::join` to indicate new behavioral guarantee when catching a foreign exception.
bd7c2e6
to
249d3d2
Compare
Updates
catch_unwind
doc comments to indicate that catching a foreign exception will no longer be UB. Instead, there are two possible behaviors, though it is not specified which one an implementation will choose.Nominated for t-lang to confirm that they are okay with making such a promise based on t-opsem FCP, or whether they would like to be included in the FCP.
Related: #74990, #115285, rust-lang/reference#1226