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

Remove unneeded null pointer asserts in ptr2int casts #97188

Merged
merged 1 commit into from
May 20, 2022

Conversation

carbotaniuman
Copy link
Contributor

This removes an assert that a pointer with address 0 has no provenance. This change is needed to support permissive provenance work in Miri, and seems justified by ptr.with_addr(0) working and a discussion on Zulip regarding LLVM semantics.

r? @RalfJung

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label May 19, 2022
@rust-highfive
Copy link
Collaborator

Some changes occured to the CTFE / Miri engine

cc @rust-lang/miri

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 19, 2022
@RalfJung
Copy link
Member

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented May 19, 2022

📌 Commit e246735 has been approved by RalfJung

@bors
Copy link
Contributor

bors commented May 19, 2022

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@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 May 19, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request May 20, 2022
…laumeGomez

Rollup of 6 pull requests

Successful merges:

 - rust-lang#96565 (rustdoc: show implementations on `#[fundamental]` wrappers)
 - rust-lang#97179 (Add new lint to enforce whitespace after keywords)
 - rust-lang#97185 (interpret/validity: separately control checking numbers for being init and non-ptr)
 - rust-lang#97188 (Remove unneeded null pointer asserts in ptr2int casts)
 - rust-lang#97189 (Update .mailmap)
 - rust-lang#97192 (Say "last" instead of "rightmost" in the documentation for `std::str:rfind`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9098f05 into rust-lang:master May 20, 2022
@rustbot rustbot added this to the 1.63.0 milestone May 20, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 1, 2022
Ensure we never consider the null pointer dereferencable

This replaces the checks that are being removed in rust-lang#97188. Those checks were too early and hence incorrect.
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants