Repository navigation
test(driver): assert a dropped Proactor releases in-flight ops - #1018
Merged
Merged
Conversation
Xerxes-2
force-pushed
the
test/driver-drop-inflight
branch
3 times, most recently
from
August 21, 2026 13:19
d7765ea to
5711766
Compare
Member
|
The IOCP |
Xerxes-2
force-pushed
the
test/driver-drop-inflight
branch
from
August 21, 2026 23:46
5711766 to
448f511
Compare
Member
Author
|
Updated to assert leak on Windows |
George-Miao
requested changes
Aug 21, 2026
`drop_with_inflight_ops` pushed an `Asyncify` op that completes immediately, so there was never an in-flight op to observe, and the test asserted nothing: it passed with or without the `Drop for Driver` fix from compio-rs#769, even under ASan. Push a recv on a bound UDP socket nobody ever sends to, so the op is genuinely in-flight, assert that `push` returns `Pending`, and then check what the driver did with the op by looking at the `SharedFd` clone the op owned. The correct outcome differs per driver, so assert both sides of it. io_uring closes the ring on drop, which makes the kernel cancel the op, and the poll driver owns its keys outright, so both must release the op. IOCP is a real proactor: dropping the port does not cancel a submitted op, so the kernel may still write into its buffer, and releasing the key or the fd would be a use-after-free -- there the op must stay leaked. Verified against mutants: removing `impl Drop for Driver` fails the io_uring assertion, and taking the non-IOCP branch on Windows fails the IOCP assertion.
Xerxes-2
force-pushed
the
test/driver-drop-inflight
branch
from
August 22, 2026 00:05
448f511 to
73021f9
Compare
Berrysoft
approved these changes
Aug 22, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The old test does not mutate, it always turns green even without the fix