std: Ensure OOM is classified as nounwind#51041
Merged
bors merged 1 commit intorust-lang:masterfrom May 26, 2018
Merged
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
Contributor
|
(rust_highfive has picked a reviewer for you, use r? to override) |
sfackler
reviewed
May 24, 2018
| // *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) { |
Member
There was a problem hiding this comment.
Oh nevermind, seems like we've already been doing this.
Member
Author
There was a problem hiding this comment.
Ah yeah this was accidentally overwriting the custom attributes we have so I just moved this around to make the attributes (unstable) take priority
nikomatsakis
approved these changes
May 25, 2018
Contributor
|
@bors r+ |
Collaborator
|
📌 Commit f674537 has been approved by |
Collaborator
bors
added a commit
that referenced
this pull request
May 26, 2018
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
Collaborator
|
☀️ Test successful - status-appveyor, status-travis |
Merged
Contributor
|
Why? Unwinding did work. #50880 (comment) |
Contributor
|
@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. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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