Skip to content

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Aug 5, 2019

@rust-highfive
Copy link
Contributor

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
Collaborator

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