Skip to content

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

RalfJung added 4 commits July 6, 2019 10:02
…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
Contributor

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
RalfJung added 2 commits July 6, 2019 14:01
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
Collaborator

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
Collaborator

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
Collaborator

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.

5 participants