-
Notifications
You must be signed in to change notification settings - Fork 266
Yoke vs noalias #2095
Copy link
Copy link
Open
Labels
C-zerovecComponent: Yoke, ZeroVec, DataBakeComponent: Yoke, ZeroVec, DataBakeT-bugType: Bad behavior, security, privacyType: Bad behavior, security, privacy
Milestone
Metadata
Metadata
Assignees
Labels
C-zerovecComponent: Yoke, ZeroVec, DataBakeComponent: Yoke, ZeroVec, DataBakeT-bugType: Bad behavior, security, privacyType: Bad behavior, security, privacy
Even with
C: StableDeref, moving the cart can potentially invalidate the yoke.However, miri does not by default report any errors when using yoke. This is due to the fact that miri's aliasing analysis/retagging does not by-default recurse into private fields, so the box's uniqueness is never asserted, along with never giving mutable access to the carted data meaning uniqueness never needs to be asserted.
-Zmiri-retag-fieldsexists to opt into the retagging of fields, which will surface this potential UB.This is mostly to note that this potential issue is known; feel free to close if this is considered a non-issue.
Related:
noaliasKimundi/owning-ref-rs#49