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

Miri: Provide pointer forcing methods for MemPlace and Op #62441

Merged
merged 6 commits into from
Jul 10, 2019

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jul 6, 2019

These are useful when one wants to to a lot of work with some place or operand and not to int-to-ptr casts all the time. In particular, this is needed to fix some test failures in Miri: we need to normalize before starting a visitor that walks a run-time value, so that we can later be sure (during the visitor walk) that we have a proper Pointer.

Also see the Miri side at rust-lang/miri#830.

Cc @eddyb @oli-obk

…thods for mplace and op to avoid repeated int-to-ptr casting during validation.

Also change Memory::copy to work on `Pointer` instead of `Scalar`.
Also rename some methods from to_* to assert_* that will panic if their precondition is not met.
@rust-highfive
Copy link
Collaborator

r? @varkor

(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 Jul 6, 2019
Normalziation does not work well for dyamically sized types
@RalfJung RalfJung changed the title Miri: Provide pointer "normalization" methods for MemPlace and Op Miri: Provide pointer forcing methods for MemPlace and Op Jul 6, 2019
@oli-obk
Copy link
Contributor

oli-obk commented Jul 10, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Jul 10, 2019

📌 Commit ac4f6ab has been approved by oli-obk

@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 Jul 10, 2019
@RalfJung
Copy link
Member Author

RalfJung commented Jul 10, 2019

Heh, you should enjoy your vacation, not work. ;)

But thanks! <3

@bors
Copy link
Contributor

bors commented Jul 10, 2019

⌛ Testing commit ac4f6ab with merge d4e1565...

bors added a commit that referenced this pull request Jul 10, 2019
Miri: Provide pointer forcing methods for MemPlace and Op

These are useful when one wants to to a lot of work with some place or operand and not to int-to-ptr casts all the time. In particular, this is needed to fix some test failures in Miri: we need to normalize before starting a visitor that walks a run-time value, so that we can later be sure (during the visitor walk) that we have a proper `Pointer`.

Also see the Miri side at rust-lang/miri#830.

Cc @eddyb @oli-obk
@bors
Copy link
Contributor

bors commented Jul 10, 2019

☀️ Test successful - checks-azure, checks-travis, status-appveyor
Approved by: oli-obk
Pushing d4e1565 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 10, 2019
@bors bors merged commit ac4f6ab into rust-lang:master Jul 10, 2019
bors added a commit to rust-lang/miri that referenced this pull request Jul 10, 2019
Fix validation and reborrowing of integer pointers

Depends on rust-lang/rust#62441
bors added a commit to rust-lang/miri that referenced this pull request Jul 11, 2019
Fix validation and reborrowing of integer pointers

Depends on rust-lang/rust#62441
@RalfJung RalfJung deleted the place-ptr-normalization branch July 23, 2019 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

None yet

5 participants