Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 12, 2019

This is a follow-up to @pnkfelix' #65020. In particular it adds some tests as @nagisa asked. It also does a cleanup that the original PR omitted to reduce backporting risks.

I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.

@rust-highfive
Copy link
Contributor

r? @petrochenkov

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2019
#![crate_type = "lib"]

// CHECK: Function Attrs: norecurse nounwind
pub extern fn foo() {}
Copy link
Member Author

Choose a reason for hiding this comment

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

This test was pretty useless: it always enabled optimizations, so even if we did not emit nounwind for this function, LLVM would add it. That's why we agreed in #65020 that it could be removed.

// unclear whether there is real value in the assumption this
// can unwind. The conservatism here may just be papering over
// a real problem by making some UB a bit harder to hit.)
true
Copy link
Member Author

Choose a reason for hiding this comment

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

In #65020 nobody knew why this branch should be needed. And all the tests behave as expected without it. So I think we should remove it.

@nagisa
Copy link
Member

nagisa commented Oct 12, 2019

r=me once Function Attrs: checks are made more future proof (i.e. once they behave well if there are additional attrs in between FunctionAttrs and the checked attribute.

@nagisa
Copy link
Member

nagisa commented Oct 12, 2019

r? @nagisa

@rust-highfive rust-highfive assigned nagisa and unassigned petrochenkov Oct 12, 2019
@RalfJung
Copy link
Member Author

@bors r=nagisa

@bors
Copy link
Collaborator

bors commented Oct 12, 2019

📌 Commit 09d7be3 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 12, 2019
Centril added a commit to Centril/rust that referenced this pull request Oct 13, 2019
nounwind tests and cleanup

This is a follow-up to @pnkfelix' rust-lang#65020. In particular it adds some tests as @nagisa  asked. It also does a cleanup that the original PR omitted to reduce backporting risks.

I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
Centril added a commit to Centril/rust that referenced this pull request Oct 13, 2019
nounwind tests and cleanup

This is a follow-up to @pnkfelix' rust-lang#65020. In particular it adds some tests as @nagisa  asked. It also does a cleanup that the original PR omitted to reduce backporting risks.

I hope I finally managed to write an uncontroversial PR in this area. ;) This should not change any behavior, just test it better.
bors added a commit that referenced this pull request Oct 13, 2019
Rollup of 10 pull requests

Successful merges:

 - #65214 (Split non-CAS atomic support off into target_has_atomic_load_store)
 - #65246 (vxWorks: implement get_path() and get_mode() for File fmt::Debug)
 - #65312 (improve performance of signed saturating_mul)
 - #65336 (Fix typo in task::Waker)
 - #65346 (nounwind tests and cleanup)
 - #65347 (Fix #[unwind(abort)] with Rust ABI)
 - #65366 (Implement Error::source on IntoStringError + Remove superfluous cause impls)
 - #65369 (Don't discard value names when using address or memory sanitizer)
 - #65370 (Add `dyn` to `Any` documentation)
 - #65373 (Fix typo in docs for `Rc`)

Failed merges:

r? @ghost
@bors bors merged commit 09d7be3 into rust-lang:master Oct 13, 2019
@RalfJung RalfJung deleted the nounwind-tests branch October 15, 2019 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants