Every wait panics on a large timeout ("overflow when adding duration to instant")
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
Research direction
Start in the named wait methods in terminal.rs around lines 3422, 3602, 3760, 3944, and 4101, and check how the builder timeout reaches default-deadline waits. Add a shared checked-add helper with a far-future fallback, then add a test for each wait using Duration::MAX and verify the builder timeout case also works.
Written by the indexing model from the issue text.
Description
What happens. Passing Duration::MAX, a common way to say "no deadline", panics:
wait_until_for(.., Duration::MAX)panics atterminal.rs:3422.wait_exit_forpanics at:4101.wait_idle_for(50ms, Duration::MAX)panics at:3760.wait_frame_forpanics at:3602.Terminal::builder().timeout(Duration::MAX)makes every default-deadline wait panic the same way.
overflow when adding duration to instant
send_str with that builder works, because std's recv_timeout saturates.
Cause. Instant::now() + timeout in wait_until (:3422, which also serves snapshot_after and wait_until_matches), wait_frame (:3602), wait_idle (:3760), wait_stable (:3944) and wait_exit (:4101).
Fix. Use Instant::now().checked_add(timeout) with a far-future fallback, in one helper the five sites share.
Done when each wait accepts Duration::MAX (and a builder timeout of Duration::MAX), with a test per wait.
- Dominant language
- Rust
- Stars
- 28
- Forks
- 24
- Avg merge
- 11h 23m
- Merged PRs (30d)
- 42
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vyncint/termlens
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Release notes show a broken link: `extract-changelog.sh` copies a reference but not its definitionOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
All issues in vyncint/termlens
Similar issues
-
good first issue help wanted r-docs
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
servo/rust-smallvec#824 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
priority middle
Difficulty 1/5 Under an hour Newbie friendliness 62/100
KATO-Hiro/AtCoderClans#12940 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hurttlocker/o8#5112 ·