-
Notifications
You must be signed in to change notification settings - Fork 276
attempt to add with overflow when using MultiProgress with hidden target #602
Copy link
Copy link
Closed
Description
Describe the bug
It seems that indicatif::multi::MultiState::draw panic with overflow in debug mode, at line 301 line_count is usize::MAX because width is 0.
thread 'fuzz' panicked at %USERPROFILE%\.cargo\git\checkouts\indicatif-f02645b5057a6299\a7456f6\src\multi.rs:305:13:
attempt to add with overflow
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library\std\src\panicking.rs:597
1: core::panicking::panic_fmt
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library\core\src\panicking.rs:72
2: core::panicking::panic
at /rustc/4578435e1695863d921c7763d5a0add98f8e3869/library\core\src\panicking.rs:127
3: indicatif::multi::MultiState::draw
at %USERPROFILE%\.cargo\git\checkouts\indicatif-f02645b5057a6299\a7456f6\src\multi.rs:301
4: indicatif::multi::MultiState::suspend<[redacted],tuple$<> >
at %USERPROFILE%\.cargo\git\checkouts\indicatif-f02645b5057a6299\a7456f6\src\multi.rs:392
5: indicatif::multi::MultiProgress::suspend<[redacted],tuple$<> >
at %USERPROFILE%\.cargo\git\checkouts\indicatif-f02645b5057a6299\a7456f6\src\multi.rs:187
[...]
To Reproduce
let multibar = MultiProgress::with_draw_target(ProgressDrawTarget::hidden());
multibar.suspend(|| println!("crash"));Expected behavior
No crash
Additional context
Using latest commit a7456f6 from git master.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels