-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Unsound Debug impl for collections::linked_list::IterMut #85813
Copy link
Copy link
Closed
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityCritical priorityT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
(playground)
@rustbot label T-libs-impl, A-collections
Caused by violation of safety invariant as documented in
IterMutyet
Debugimplementation doeshttps://doc.rust-lang.org/nightly/src/alloc/collections/linked_list.rs.html#79
I’m not sure where the
listfield 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.