-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsound Debug impl for collections::linked_list::IterMut #85813
Comments
Assigning @rustbot modify labels -I-prioritize +P-critical |
Good catch! Iterator debug implementations seem to be woefully under-audited in terms of soundness problems (this is not the first such issue). |
@RalfJung maybe you can help me out with how to run miri while hacking |
Miri uses xargo for sysroot compilation, so setting |
Oh, also, if you want to run the alloc/core test suites in Miri, see https://github.com/RalfJung/miri-test-libstd. |
(playground)
@rustbot label T-libs-impl, A-collections
Caused by violation of safety invariant as documented in
IterMut
yet
Debug
implementation doeshttps://doc.rust-lang.org/nightly/src/alloc/collections/linked_list.rs.html#79
I’m not sure where the
list
field is really used at all, so maybe it can be replaced by a markermarker: PhantomData<&'a mut Node<T>>
, similar tolinked_list::Iter
’s implementation.The text was updated successfully, but these errors were encountered: