Set EH personality when resuming stack unwinding#36895
Closed
dylanmckay wants to merge 1 commit intorust-lang:masterfrom
Closed
Set EH personality when resuming stack unwinding#36895dylanmckay wants to merge 1 commit intorust-lang:masterfrom
dylanmckay wants to merge 1 commit intorust-lang:masterfrom
Conversation
Contributor
|
r? @Aatch (rust_highfive has picked a reviewer for you, use r? to override) |
To resume stack unwinding, the LLVM `resume` instruction must be used. In order to use this instruction, the calling function must have an exception handling personality set. LLVM 4.0 adds a new IR validation check to ensure a personality is always set in these cases. This was introduced in [r277360](https://reviews.llvm.org/rL277360).
37eed84 to
806de7d
Compare
nagisa
reviewed
Oct 1, 2016
| if let Some(cleanup_pad) = cleanup_pad { | ||
| bcx.cleanup_ret(cleanup_pad, None); | ||
| } else { | ||
| let llpersonality = bcx.fcx.eh_personality(); |
Member
There was a problem hiding this comment.
Why is init_cpad not doing enough? You are not supposed to have resume without some sort of cleanups going on.
Contributor
Author
There was a problem hiding this comment.
I'm looking into that now. The issue that we found in avr-rust#18 was having a resume without a personality inside std::mem::forget, which is basically a nop so I don't think there is any cleanup to do.
8c90fd8 to
806de7d
Compare
Member
|
Closing due to inactivity, but feel free to resubmit with comments addressed! |
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.
To resume stack unwinding, the LLVM
resumeinstruction must be used.In order to use this instruction, the calling function must have an
exception handling personality set.
LLVM 4.0 adds a new IR validation check to ensure a personality is
always set in these cases.
This was introduced in r277360.