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

Try to avoid panics on buggy (?) clocks #8114

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

alexcrichton
Copy link
Member

Try to avoid panics with Instant by only performing infallible
operations. This tweaks a comparison located in #8042 to use Instant
comparisons rather than Duration comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.

I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...

Closes #8042

Try to avoid panics with `Instant` by only performing infallible
operations. This tweaks a comparison located in rust-lang#8042 to use `Instant`
comparisons rather than `Duration` comparisons which should hopefully
eliminate a source of panics in the face of buggy (maybe?) clocks.

I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...

Closes rust-lang#8042
@rust-highfive
Copy link

r? @Eh2406

(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 Apr 15, 2020
@Eh2406
Copy link
Contributor

Eh2406 commented Apr 15, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Apr 15, 2020

📌 Commit be020a5 has been approved by Eh2406

@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 Apr 15, 2020
@bors
Copy link
Contributor

bors commented Apr 15, 2020

⌛ Testing commit be020a5 with merge f22d17c...

@bors
Copy link
Contributor

bors commented Apr 15, 2020

☀️ Test successful - checks-azure
Approved by: Eh2406
Pushing f22d17c to master...

@bors bors merged commit f22d17c into rust-lang:master Apr 15, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Apr 16, 2020
Update cargo

3 commits in 74e3a7d5b756d7c0e94399fc29fcd154e792c22a..ebda5065ee8a1e46801380abcbac21a25bc7e755
2020-04-13 20:41:52 +0000 to 2020-04-16 14:28:43 +0000
- Don't use debug display for error object. (rust-lang/cargo#8119)
- Add backwards-compatibility for old cargo-tree flags. (rust-lang/cargo#8115)
- Try to avoid panics on buggy (?) clocks (rust-lang/cargo#8114)
@alexcrichton alexcrichton deleted the change-condition branch July 29, 2020 17:48
@ehuss ehuss added this to the 1.44.0 milestone Feb 6, 2022
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.

Downloading can panic with "supplied instant is later than self"
5 participants