Skip to content
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

Upgrade libc to fix Instant + Duration producing wrong result on aarch64-apple-darwin #94100

Closed
wants to merge 9 commits into from

Conversation

lyinch
Copy link

@lyinch lyinch commented Feb 17, 2022

This is a regression test and a fixes #91417
It also bumps the libc version to 0.2.119 because it requires the constant introduced here: rust-lang/libc#2689

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @yaahc (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 17, 2022
@lyinch lyinch changed the title Issue 91417 fix Issue #91417 fix Feb 17, 2022
bors added a commit to rust-lang/libc that referenced this pull request Feb 19, 2022
Bump version to 0.2.119

I'd like a new release because rust-lang/rust#94100 requires the merged PR: #2689
@lyinch lyinch marked this pull request as ready for review February 19, 2022 15:42
@yaahc
Copy link
Member

yaahc commented Mar 18, 2022

looks great. Thank you very much @lyinch ^_^

@bors r+

@bors
Copy link
Contributor

bors commented Mar 18, 2022

📌 Commit 283ccc9 has been approved by yaahc

@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 Mar 18, 2022
@yaahc yaahc added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Mar 18, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 18, 2022
Issue rust-lang#91417 fix

This is a regression test and a fixes rust-lang#91417
It also bumps the libc version to 0.2.119 because it requires the constant introduced here: rust-lang/libc#2689
@klensy
Copy link
Contributor

klensy commented Mar 18, 2022

libc update will likely fail similar to #94052

@Dylan-DPC
Copy link
Member

@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2022
@dtolnay dtolnay changed the title Issue #91417 fix Upgrade libc to fix Instant + Duration producing wrong result on aarch64-apple-darwin Mar 18, 2022
@bors
Copy link
Contributor

bors commented Apr 5, 2022

☔ The latest upstream changes (presumably #95035) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnCSimon
Copy link
Member

ping from triage:
@lyinch
Returning to you to address comments.

FYI: when a PR is ready for review, send a message containing
@rustbot ready to switch to S-waiting-on-review so the PR is in the reviewer's backlog.

@JohnCSimon
Copy link
Member

@lyinch
Ping from triage: I'm closing this due to inactivity, Please reopen when you are ready to continue with this.
Note: if you do please open the PR BEFORE you force push to it, else you won't be able to reopen.
Thanks for your contribution.

@rustbot label: +S-inactive

@JohnCSimon JohnCSimon closed this May 22, 2022
@rustbot rustbot added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label May 22, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 18, 2022
Fix non-associativity of `Instant` math on `aarch64-apple-darwin` targets

This is a duplicate of rust-lang#94100 (since the original author is unresponsive), which resolves rust-lang#91417.

On `aarch64-apple-darwin` targets, the internal resolution of `Instant` is lower than that of `Duration`, so math between them becomes non-associative with small-enough durations.

This PR makes this target use the standard Unix implementation (where `Instant` has 1ns resolution), but with `CLOCK_UPTIME_RAW` so it still returns the same values as `mach_absolute_time`[^1].

(Edit: I need someone to confirm that this still works, I do not have access to an M1 device.)

[^1]: https://www.manpagez.com/man/3/clock_gettime/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instant + Duration produce wrong result on aarch64-apple-darwin
9 participants