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

Improve pointer offset method docs #63297

Merged
merged 2 commits into from
Aug 12, 2019
Merged

Improve pointer offset method docs #63297

merged 2 commits into from
Aug 12, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Aug 5, 2019

@rust-highfive
Copy link
Collaborator

r? @dtolnay

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 5, 2019
Copy link
Contributor

@gnzlbg gnzlbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL that we promise that pointer-to-integer casts erase provenance information. I'm not sure how this can be implemented given that C does allow propagating provenance in pointer-to-integer casts, but since this is not a new guarantee, this LGTM.

@RalfJung
Copy link
Member Author

RalfJung commented Aug 6, 2019

TIL that we promise that pointer-to-integer casts erase provenance information. I'm not sure how this can be implemented given that C does allow propagating provenance in pointer-to-integer casts, but since this is not a new guarantee

I added this some releases ago and it was my understanding that it reflects our current semantics. It looks like C is moving in the same direction. And in particular LLVM pretty much has no other choice; tons of LLVM optimizations (most importantly large chunks of what GVN does) are invalid if integers have provenance. This currently leads to LLVM miscompiling things.

@dtolnay
Copy link
Member

dtolnay commented Aug 12, 2019

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 12, 2019

📌 Commit 0dc9e2a has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 12, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 12, 2019
bors added a commit that referenced this pull request Aug 12, 2019
Rollup of 10 pull requests

Successful merges:

 - #62108 (Use sharded maps for queries)
 - #63297 (Improve pointer offset method docs)
 - #63306 (Adapt AddRetag for shallow retagging)
 - #63406 (Suggest using a qualified path in patterns with inconsistent bindings)
 - #63431 (Revert "Simplify MIR generation for logical ops")
 - #63449 (resolve: Remove remaining special cases from built-in macros)
 - #63461 (docs: add stdlib env::var(_os) panic)
 - #63473 (Regression test for #56870)
 - #63474 (Add tests for issue #53598 and #57700)
 - #63480 (Fixes #63477)

Failed merges:

r? @ghost
Centril added a commit to Centril/rust that referenced this pull request Aug 12, 2019
bors added a commit that referenced this pull request Aug 12, 2019
Rollup of 9 pull requests

Successful merges:

 - #62108 (Use sharded maps for queries)
 - #63297 (Improve pointer offset method docs)
 - #63406 (Suggest using a qualified path in patterns with inconsistent bindings)
 - #63431 (Revert "Simplify MIR generation for logical ops")
 - #63449 (resolve: Remove remaining special cases from built-in macros)
 - #63461 (docs: add stdlib env::var(_os) panic)
 - #63473 (Regression test for #56870)
 - #63474 (Add tests for issue #53598 and #57700)
 - #63480 (Fixes #63477)

Failed merges:

r? @ghost
@bors bors merged commit 0dc9e2a into rust-lang:master Aug 12, 2019
@RalfJung RalfJung deleted the ptr_offset branch August 12, 2019 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants