Skip to content

miri engine: Stacked Borrows NG - #55270

Merged
bors merged 5 commits into
rust-lang:masterfrom
RalfJung:stacked-borrows-ng
Oct 29, 2018
Merged

miri engine: Stacked Borrows NG#55270
bors merged 5 commits into
rust-lang:masterfrom
RalfJung:stacked-borrows-ng

Conversation

@RalfJung

Copy link
Copy Markdown
Member

For more refined tracking in miri, we do return untagged pointers from the memory abstraction after allocations and let the caller decide how to tag these.

Also refactor the tag_(de)reference hooks so they can be more easily called in the ref-to-place and place-to-ref methods, and reorder things in validation: validation calls ref-to-place which (when running in miri) triggers some checks, so we want to run it rather late and catch other problems first. We also do not need to redundantly check the ref to be allocated any more, the checks miri does anyway imply thath.

r? @oli-obk

Comment threadsrc/librustc_mir/interpret/memory.rs Outdated
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 22, 2018
@bors

bors commented Oct 22, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 6fb754aaddbdd8e77200849332e0db2e851ecc58 has been approved by oli-obk

@borsbors 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 Oct 22, 2018
@RalfJung

Copy link
Copy Markdown
MemberAuthor

Cycling PR to hopefully get the PR-travis state unstuck.

@RalfJungRalfJung reopened this Oct 23, 2018
@RalfJung

Copy link
Copy Markdown
MemberAuthor

@bors r=oli-obk

@bors

bors commented Oct 23, 2018

Copy link
Copy Markdown
Collaborator

💡 This pull request was already approved, no need to approve it again.

@bors

bors commented Oct 23, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 6fb754aaddbdd8e77200849332e0db2e851ecc58 has been approved by oli-obk

This was referenced Oct 23, 2018
@bors

bors commented Oct 25, 2018

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #55347) made this pull request unmergeable. Please resolve the merge conflicts.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 25, 2018
@RalfJung

Copy link
Copy Markdown
MemberAuthor

Rebased.

@bors r=oli-obk

@bors

bors commented Oct 26, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 292d862a633d993ded2ab8f57eaf2ceace56a6cc has been approved by oli-obk

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 26, 2018
@bors

This comment has been minimized.

@borsbors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 26, 2018
@RalfJung

Copy link
Copy Markdown
MemberAuthor

Rebased.

@bors r=oli-obk

@bors

bors commented Oct 28, 2018

Copy link
Copy Markdown
Collaborator

📌 Commit 95b19bb has been approved by oli-obk

@bors

bors commented Oct 28, 2018

Copy link
Copy Markdown
Collaborator

🌲 The tree is currently closed for pull requests below priority 1, this pull request will be tested once the tree is reopened

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 28, 2018
@bors

bors commented Oct 29, 2018

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 95b19bb with merge 4e88b73...

bors added a commit that referenced this pull request Oct 29, 2018
miri engine: Stacked Borrows NG
For more refined tracking in miri, we do return untagged pointers from the memory abstraction after allocations and let the caller decide how to tag these.
Also refactor the `tag_(de)reference` hooks so they can be more easily called in the ref-to-place and place-to-ref methods, and reorder things in validation: validation calls ref-to-place which (when running in miri) triggers some checks, so we want to run it rather late and catch other problems first. We also do not need to redundantly check the ref to be allocated any more, the checks miri does anyway imply thath.
r? @oli-obk
@bors

bors commented Oct 29, 2018

Copy link
Copy Markdown
Collaborator

☀️ Test successful - status-appveyor, status-travis
Approved by: oli-obk
Pushing 4e88b73 to master...

@bors
bors merged commit 95b19bb into rust-lang:masterOct 29, 2018
@borsbors mentioned this pull request Oct 29, 2018
bors added a commit that referenced this pull request Nov 2, 2018
Add Retagging statements
This adds a `Retag` statement kind to MIR, used to perform the retagging operation from [Stacked Borrows](https://www.ralfj.de/blog/2018/08/07/stacked-borrows.html). It also kills the old `Validate` statements that I added last year.
NOTE: This includes #55270. Only [these commits are new](RalfJung/rust@stacked-borrows-ng...RalfJung:retagging).
@RalfJung
RalfJung deleted the stacked-borrows-ng branch November 9, 2018 15:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: 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.

4 participants

@RalfJung@oli-obk@bors@rust-highfive