console-rs / indicatif

A command line progress reporting library for Rust
MIT License
4.22k stars 238 forks source link

Overflow error #575

Closed cjordan closed 10 months ago

cjordan commented 10 months ago

Hi, thanks for your work on indicatif, which we've been happily using for years now.

Recently, an overflow bug became apparent to us and has already been fixed (thanks!). However, I seem to have stumbled across another one. Here is the link to our CI job as well as the offending line of code:

https://github.com/MWATelescope/Birli/actions/runs/5828640212/job/15806705268#step:4:234 https://github.com/console-rs/indicatif/blob/27c839904e4f60570535adfa72a33e3220fb6d03/src/multi.rs#L293

I'm almost certain the issue stems from using a progress bar somewhere with very little work to do, but I'm sure you agree that these potential issues should be handled, probably like the other overflow bug (i.e. saturating add). I'm happy to contribute code to fix the bug.

djc commented 10 months ago

Yeah, please submit a PR!