Skip to content

pthread_exit return type fix #1525

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

Merged
merged 3 commits into from
Sep 20, 2019
Merged

pthread_exit return type fix #1525

merged 3 commits into from
Sep 20, 2019

Conversation

newpavlov
Copy link
Contributor

Closes: #1520

@rust-highfive
Copy link

r? @gnzlbg

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

@gnzlbg
Copy link
Contributor

gnzlbg commented Sep 20, 2019

Thank you. I think we should do this, but I want to be careful that we can revert this easily if this breaks too much code.

I hope that nobody is using the return value of pthread_exit in any way, but who knows, so I'm going to land this in the following way:

  • I'm going to do a libc release (0.2.64):
  • I'm going to then update libc on rust-lang rust to 0.2.64
    • and wait a couple of nightlies to see if that goes smoothly
  • At this point we have a 0.2.64 version that's known to work
  • Merge this change, and release 0.2.65 only with this change
    • if people complain too much, we can yank 0.2.65
  • Update rust-lang/rust to 0.2.65.
    • if something breaks, we can yank, and then revert the PR
  • Done, this change is good.

This is sadly a lot of steps, and will take ~1 week for the 0.2.64 release, and ~1 week for the 0.2.65 release, but such is life.

If after doing the 0.2.64 thing something high-priority must land upstream (new target, critical target upgrade), I'll prioritize that, and do this in the next release.

@newpavlov
Copy link
Contributor Author

I don't think it should break any code. This snippet works without any issues:

fn foo() -> ! { panic!(); }
fn main() { let a: u64 = foo(); }

And during type inference right now Rust defaults to (), e.g. this code:

fn foo() -> ! { panic!(); }
fn main() { let a = foo(); a + 1; }

Returns "cannot add i32 to ()" compilation error.

@gnzlbg
Copy link
Contributor

gnzlbg commented Sep 20, 2019

Ah awesome, I thought that let x = ! would fail to compile.

@bors: r+ then :)

@bors
Copy link
Contributor

bors commented Sep 20, 2019

📌 Commit 7d1907e has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Sep 20, 2019

⌛ Testing commit 7d1907e with merge 8dfdfec...

bors added a commit that referenced this pull request Sep 20, 2019
pthread_exit return type fix

Closes: #1520
@bors
Copy link
Contributor

bors commented Sep 20, 2019

💔 Test failed - status-azure

@gnzlbg
Copy link
Contributor

gnzlbg commented Sep 20, 2019

@bors: retry

@bors
Copy link
Contributor

bors commented Sep 20, 2019

⌛ Testing commit 7d1907e with merge 2f5ed5d...

bors added a commit that referenced this pull request Sep 20, 2019
pthread_exit return type fix

Closes: #1520
@bors
Copy link
Contributor

bors commented Sep 20, 2019

☀️ Test successful - checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure
Approved by: gnzlbg
Pushing 2f5ed5d to master...

@bors bors merged commit 7d1907e into rust-lang:master Sep 20, 2019
@newpavlov newpavlov deleted the patch-4 branch September 20, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return type of pthread_exit
4 participants