Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #31482
Closed (moved) (moved)
Open
Created Aug 22, 2019 by teor@teor

Avoid possible overflow when converting between coarse stamp to approx ms

Our coarse monotonic time conversion code can overflow on some platforms.

In particular, passing a large rate to a token bucket will overflow on iOS, and any other platform where monotime.numerator^2^ / monotime.denominator > 512.

I have a fix that makes sure that token bucket's rate_per_sec_to_rate_per_sec() can't cause an overflow. I can do tests and a changes file after nickm answers some of my remaining questions.

Gaba, this is a fix on a refactor for #25766 (moved), which was originally for sponsor 8. Are refactor bug fixes covered by sponsor 31 now?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking