-
Notifications
You must be signed in to change notification settings - Fork 1
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
Meeting Proposal: Do we allow zero-sized memory accesses? #12
Comments
We didn't really reach a conclusion. We discussed the "zero-sized accesses as optimization helpers" problem quite a bit. Generally the concerns were:
More explicit ways to get the optimization hint to the compiler were discussed; however, the point was made that we should still be concerned with optimizing code people naively write without giving explicit hints. For null, most people didn't see a reason to disallow zero-sized null accesses, except for maybe out of an abundance of caution to avoid accidentally allowing code we might regret allowing later. We didn't get around to discussing the alternative model for achieving provenance monotonicity. |
I guess the post-meeting action is for me to write up a more concrete proposal and start FCP on it. I'm still leaning towards "all pointers can do zero-sized accesses (except maybe on null)", if only to avoid a distinction between pointers that can and pointers that cannot do such accesses. There was a bunch of follow-up discussion after the meeting on Zulip that should also be summarized. |
Done that: rust-lang/unsafe-code-guidelines#472 |
I've kicked of the FCP process in that issue, I don't think there is a reason to still keep this one open. |
Summary
In #10 we decided to allow
offset(0)
on all pointers. What about zero-sized load/store/copy, do we allow those as well for arbitrary pointers?Reading
https://hackmd.io/@CV5q1SRASEuY8WfOgd_3iQ/S1vaTT7oh
Comment policy
These issues are meant to be used as an "announcements channel" regarding the proposal, and not as a
place to discuss the technical details. Feel free to subscribe to updates. We'll post comments when
reviewing the proposal in meetings or making a scheduling decision. In the meantime, if you have
questions or ideas, ping the proposers on Zulip (or elsewhere).
The text was updated successfully, but these errors were encountered: