-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
std: Ensure OOM is classified as nounwind
#51041
Conversation
OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes rust-lang#50925
(rust_highfive has picked a reviewer for you, use r? to override) |
// *in Rust code* may unwind. Foreign items like `extern "C" { | ||
// fn foo(); }` are assumed not to unwind **unless** they have | ||
// a `#[unwind]` attribute. | ||
} else if !cx.tcx.is_foreign_item(id) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to cause similar issues to #48251?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nevermind, seems like we've already been doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah this was accidentally overwriting the custom attributes we have so I just moved this around to make the attributes (unstable) take priority
@bors r+ |
📌 Commit f674537 has been approved by |
std: Ensure OOM is classified as `nounwind` OOM can't unwind today, and historically it's been optimized as if it can't unwind. This accidentally regressed with recent changes to the OOM handler, so this commit adds in a codegen test to assert that everything gets optimized away after the OOM function is approrpiately classified as nounwind Closes #50925
☀️ Test successful - status-appveyor, status-travis |
Why? Unwinding did work. #50880 (comment) |
@glandium I think the idea here is not that unwinding can't work, but rather that we should preserve a way to keep these optimizations for the people who don't make use of unwinding OOM. |
OOM can't unwind today, and historically it's been optimized as if it can't
unwind. This accidentally regressed with recent changes to the OOM handler, so
this commit adds in a codegen test to assert that everything gets optimized away
after the OOM function is approrpiately classified as nounwind
Closes #50925