summaryrefslogtreecommitdiffstats
path: root/tokio/tests/sync_mpsc.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2020-04-02 07:52:02 -0700
committerGitHub <noreply@github.com>2020-04-02 07:52:02 -0700
commitfa4fe9ef6feea7c8c88c81559797e57da7368b36 (patch)
treeda38800980cbb49554f83c449535afa8952dacb4 /tokio/tests/sync_mpsc.rs
parentf01136b5c0bbbe72fa674df4924cc53a872cffff (diff)
rt: fix queue regression (#2362)
The new queue uses `u8` to track offsets. Cursors are expected to wrap. An operation was performed with `+` instead of `wrapping_add`. This was not _obviously_ issue before as it is difficult to wrap a `usize` on 64bit platforms, but wrapping a `u8` is trivial. The fix is to use `wrapping_add` instead of `+`. A new test is added that catches the issue. Fixes #2361
Diffstat (limited to 'tokio/tests/sync_mpsc.rs')
0 files changed, 0 insertions, 0 deletions