-
Notifications
You must be signed in to change notification settings - Fork 59
glossary: define pointer provenance #179
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
Conversation
@rkruppe I would particularly appreciate your feedback here. |
The example and explanation seems good to me. But AFAIK the exact form provenance information takes is still up for debate and will probably wind up richer than just a simple numeric ID for allocations. Also, pointer<->integer casts interact with provenance and cautious readers may wonder how the simple "one pointer, in one specific allocation" provenance model works with such casts (it doesn't really). So IMO there should be a note saying that this |
@rkruppe the alloc ID was meant as just an example for what provenance can be. I did not mean to say that this is exactly what provenance is in Rust. But I think it nicely demonstrates that rules like cross-object address arithmetic not producing usable pointers need some "magic" in the pointers, and how provenance can implement such rules operationally. The entire discussion of alloc IDs starts with "For example", but I guess you are saying that is not enough? I will try to make it clearer. |
Yes, I just meant that it's not as clear as could be. But reading again, I think the pointers to other kinds of provenance at the end (stacked borrows, the proposals for C coming out of Cerberus) should be sufficient. The unresolved interaction with int<->ptr casts (do integers have provenance?) does deserve mention though, IMO. |
@rkruppe I did some edits, what do you think? |
No description provided.