-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Conversation
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. |
Bump version to 0.2.119 I'd like a new release because rust-lang/rust#94100 requires the merged PR: #2689
📌 Commit 283ccc9 has been approved by |
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
libc update will likely fail similar to #94052 |
@bors r- |
Instant + Duration
producing wrong result on aarch64-apple-darwin
☔ The latest upstream changes (presumably #95035) made this pull request unmergeable. Please resolve the merge conflicts. |
ping from triage: FYI: when a PR is ready for review, send a message containing |
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/
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