Uh oh!
There was an error while loading. Please reload this page.
Use NonNull pointer in the place of references in AtomicRef and AtomicRefMut to avoid noalias related soundness bug. - #18
Merged
Conversation
function where the `AtomicRef` is dropped and a new borrow is taken from the cell to catch potential UB in this scenario using Miri.
Imberflur added a commit
to Imberflur/shred
that referenced
this pull request
Feb 5, 2023
address stacked borrows UB detected by Miri. This is similar to mozilla/atomic_refcell#18
This was referenced Feb 5, 2023
Imberflur
commented
Feb 11, 2023
ContributorAuthor
Forgot |
cuviper
commented
Apr 21, 2023
I think you'll want to update |
`AtomicRefMut` to avoid `noalias` related soundness bug.
Imberflur
commented
Apr 23, 2023
ContributorAuthor
I updated |
bholley
commented
Apr 24, 2023
Collaborator
Thanks. Sorry for the long-delay reviewing this, I had to page a bunch of stuff back in. I've released this as 0.1.10. |
This was referenced Aug 23, 2023
richard-uk1 pushed a commit
to richard-uk1/shred
that referenced
this pull request
Feb 28, 2025
address stacked borrows UB detected by Miri. This is similar to mozilla/atomic_refcell#18
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 freeto 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.
With this test added:
Running
cargo +nightly miri testproduces:This PR replaces the reference with
NonNull<T>which is the same fix applied for std::cell::RefCell.