Skip to content
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

Monotonicity wrt provenance? #3

Closed
RalfJung opened this issue May 26, 2022 · 0 comments
Closed

Monotonicity wrt provenance? #3

RalfJung opened this issue May 26, 2022 · 0 comments

Comments

@RalfJung
Copy link
Collaborator

The semantics is, crucially, "monotone" with respect to initialization: replacing an Uninit byte in memory by any other byte can never introduce UB, it can only make program behavior "more defined". Should we have the same with respect to provenance, i.e., should replacing a Raw byte by a Ptr byte (with the same data value) with arbitrary provenance only make the program more defined? Due to all the constraints on how encode and decode relate, this is equivalent to asking: should ptr2int transmutation implicitly strip provenance (instead of being UB, like it is now)?

I do not have a set opinion on this. Also see this Zulip discussion. rust-lang/unsafe-code-guidelines#286 is the UCG issue; here I am just tracking the MiniRust consequences of that decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant