diff options
author | Carl Lerche <me@carllerche.com> | 2020-04-09 11:35:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 11:35:16 -0700 |
commit | 58ba45a38cc101e695895cc39d8ee4ce74176397 (patch) | |
tree | 18dd0eef6611562bd517f49f2c298714c53f5d2d /tokio/Cargo.toml | |
parent | de8326a5a490aafdf12848820d1496b758f1ec57 (diff) |
rt: fix bug in work-stealing queue (#2387)
Fixes a couple bugs in the work-stealing queue introduced as
part of #2315. First, the cursor needs to be able to represent more
values than the size of the buffer. This is to be able to track if
`tail` is ahead of `head` or if they are identical. This bug resulted in
the "overflow" path being taken before the buffer was full.
The second bug can happen when a queue is being stolen from concurrently
with stealing into. In this case, it is possible for buffer slots to be
overwritten before they are released by the stealer. This is harder to
happen in practice due to the first bug preventing the queue from
filling up 100%, but could still happen. It triggered an assertion in
`steal_into`. This bug slipped through due to a bug in loom not
correctly catching the case. The loom bug is fixed as part of
tokio-rs/loom#119.
Fixes: #2382
Diffstat (limited to 'tokio/Cargo.toml')
-rw-r--r-- | tokio/Cargo.toml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tokio/Cargo.toml b/tokio/Cargo.toml index 9fd5f95d..5b099c12 100644 --- a/tokio/Cargo.toml +++ b/tokio/Cargo.toml @@ -129,7 +129,7 @@ tempfile = "3.1.0" # loom is currently not compiling on windows. # See: https://github.com/Xudong-Huang/generator-rs/issues/19 [target.'cfg(not(windows))'.dev-dependencies] -loom = { version = "0.3.0", features = ["futures", "checkpoint"] } +loom = { version = "0.3.1", features = ["futures", "checkpoint"] } [package.metadata.docs.rs] all-features = true |