Skip to content

Yoke vs noalias #2095

Open
Open
@CAD97

Description

@CAD97

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-fields exists 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:

Metadata

Metadata

Assignees

Labels

C-zerovecComponent: Yoke, ZeroVec, DataBakeT-bugType: Bad behavior, security, privacy

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions