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

clock: Fix current monotonic time in millis u32 overflow panic #1645

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

YaLTeR
Copy link
Contributor

@YaLTeR YaLTeR commented Jan 24, 2025

@YaLTeR
Copy link
Contributor Author

YaLTeR commented Jan 24, 2025

"Integer conversions" here says that unsigned overflow on conversion does a modulo: https://en.cppreference.com/w/c/language/conversion

u64 as u32 also does a modulo: https://doc.rust-lang.org/stable/reference/expressions/operator-expr.html#numeric-cast

@Drakulix Drakulix merged commit 7b46d1d into Smithay:master Jan 24, 2025
13 checks passed
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.

Time::as_millis() overflows after ~50 days of uptime causing crashes with panic on overflow
2 participants