Fix multiple memory ordering/synchronization issues detected with Miri#72
Merged
Fix multiple memory ordering/synchronization issues detected with Miri#72
Conversation
c22a79e to
8150835
Compare
Documents the safety requirements on the unsafe function regarding synchronizing with the other end of the channel Fixes the following miri tests: tx_drop_rx_drop tx_drop_rx_recv_ref tx_drop_rx_recv_timeout tx_drop_rx_try_recv_to_completion tx_drop_rx_try_recv_then_drop tx_drop_rx_poll_to_completion
Fixes the tx_drop_rx_recv_done test
8150835 to
b6fb012
Compare
This was referenced Jan 25, 2026
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.
Thanks to issue #69 which led to PR #71 I was able to track down some potential UB in
oneshotdue to too relaxed memory ordering in some places.This PR makes all tests added in #71 pass except for:
tx_send_rx_poll_then_droptx_drop_rx_poll_then_dropThose two tests are not caused by invalid memory orderings. Those tests fail because of #73 and will be fixed in a separate PR.
This PR fixes #69