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

Add MemoryExtra in InterpretCx constructor params #62158

Merged
merged 3 commits into from
Jul 5, 2019
Merged

Add MemoryExtra in InterpretCx constructor params #62158

merged 3 commits into from
Jul 5, 2019

Conversation

pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Jun 26, 2019

This is to avoid modifying MemoryExtra inside InterpretCx after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung

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

Please also change Machine trait in machine.rs to not require a Default bound for MemoryExtra.

@pvdrz
Copy link
Contributor Author

pvdrz commented Jun 26, 2019

Please also change Machine trait in machine.rs to not require a Default bound for MemoryExtra.

I believe this is still required for all the Memory initializations inside the compiler. Should I remove it then?

Edit: Here for example: https://github.com/rust-lang/rust/blob/0a7b9953672e1c5cedee029b288fdc1d7b794cc7/src/librustc_mir/const_eval.rs#L50

@RalfJung
Copy link
Member

That code will still work fine because there we are using a concrete MemoryExtra that does implement Default.

But what the trait says is that anyone implementing the Machine interface must provide a MemoryExtra that implements Default. There is no reason left to require that.

Copy link
Member

@RalfJung RalfJung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! r=me once Travis is green and with the nit fixed.

@bors delegate

@pvdrz
Copy link
Contributor Author

pvdrz commented Jun 26, 2019

r=@RalfJung

@RalfJung
Copy link
Member

RalfJung commented Jun 26, 2019

It would be @ bors r=RalfJung. Note the lack of a second @. ;)

@bors r+

@bors
Copy link
Contributor

bors commented Jun 26, 2019

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Jun 26, 2019

🌲 The tree is currently closed for pull requests below priority 999, 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 Jun 26, 2019
@bors
Copy link
Contributor

bors commented Jun 26, 2019

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

@bors
Copy link
Contributor

bors commented Jun 26, 2019

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung.`

@bors
Copy link
Contributor

bors commented Jun 26, 2019

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

@bors
Copy link
Contributor

bors commented Jun 26, 2019

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

@bors
Copy link
Contributor

bors commented Jun 26, 2019

📌 Commit 74a9c6eefcfa6469fae9f76d023429c0cb619ead has been approved by RalfJung

@bors
Copy link
Contributor

bors commented Jun 26, 2019

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

@pvdrz
Copy link
Contributor Author

pvdrz commented Jun 26, 2019

It would be @ bors r=RalfJung. Note the lack of a second @. ;)

@bors r+

Oh ok! Thank you!

@bors
Copy link
Contributor

bors commented Jun 26, 2019

@christianpoveda: 🔑 Insufficient privileges: Not in reviewers

@RalfJung
Copy link
Member

RalfJung commented Jun 28, 2019

@bors rollup=never (breaks Miri)

@rust-lang/infra why does rollup- not work? That would be much more consistent with the rest of the syntax.

@pvdrz
Copy link
Contributor Author

pvdrz commented Jun 28, 2019

Remember that rust-lang/miri#792 needs these changes to work

@RalfJung
Copy link
Member

I do. The thing is, we are about to branch off beta in less than a week, which means changes that break Miri cannot land. So once #62105 lands, we'll have to fold a Miri update into this PR.

@RalfJung
Copy link
Member

Looks very much like the Miri update will land first, so let's avoid wasting CI time.

@bors r-

@bors bors 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 Jun 28, 2019
@RalfJung
Copy link
Member

@christianpoveda okay the Miri PR landed, are you ready to update this one? I prepared the rustup branch in the Miri repository for you. The sequence of commands for you (assuming you checked out your local branch for this PR) should roughly be

git fetch origin
git rebase origin/master # this should just work without conflicts
git status # this should show a clean working dir!
cd src/tools/miri
git fetch origin
git reset --hard origin/rustup
cd ../../..
./x.py # updates Cargo.lock if needed
git commit -am "update miri"

@RalfJung
Copy link
Member

Now how do I get rid of this "rollup=never" thing...

@bors rollup-

@bors
Copy link
Contributor

bors commented Jul 1, 2019

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

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

RalfJung commented Jul 1, 2019

@christianpoveda we got overtaken by another PR that also modifies Miri... can you do a rebase and do the submodule update again? I updated the rustup branch on the Miri side.

@RalfJung
Copy link
Member

RalfJung commented Jul 1, 2019

Alternatively, you can remove the miri-updating commit and we wait until Wednesday, when we get out of the "freeze" for tools.

@pvdrz
Copy link
Contributor Author

pvdrz commented Jul 1, 2019

Alternatively, you can remove the miri-updating commit and we wait until Wednesday, when we get out of the "freeze" for tools.

I will do this, it seems the better option right now
Edit: It is done, I'll wait until wednesday to see what's up

@RalfJung
Copy link
Member

RalfJung commented Jul 2, 2019

It's just 4h until it's Wednesday UTC, I feel confident this will not land fast enough to cause problems and I want to stop having to remember.^^

@bors r+

@bors
Copy link
Contributor

bors commented Jul 2, 2019

📌 Commit e32b8eb has been approved by RalfJung

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 2, 2019
@bors
Copy link
Contributor

bors commented Jul 4, 2019

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

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

RalfJung commented Jul 4, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Jul 4, 2019

📌 Commit e45bbaf has been approved by RalfJung

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
Centril added a commit to Centril/rust that referenced this pull request Jul 5, 2019
…=RalfJung

Add MemoryExtra in InterpretCx constructor params

This is to avoid modifying `MemoryExtra` inside `InterpretCx` after initialization. Related miri PR: rust-lang/miri#792

r? @RalfJung
bors added a commit that referenced this pull request Jul 5, 2019
Rollup of 13 pull requests

Successful merges:

 - #61545 (Implement another internal lints)
 - #62110 (Improve -Ztime-passes)
 - #62133 (Feature gate `rustc` attributes harder)
 - #62158 (Add MemoryExtra in InterpretCx constructor params)
 - #62168 (The (almost) culmination of HirIdification)
 - #62193 (Create async version of the dynamic-drop test)
 - #62369 (Remove `compile-pass` from compiletest)
 - #62380 (rustc_target: avoid negative register counts in the SysV x86_64 ABI.)
 - #62381 (Fix a typo in Write::write_vectored docs)
 - #62390 (Update README.md)
 - #62396 (remove Scalar::is_null_ptr)
 - #62406 (Lint on invalid values passed to x.py --warnings)
 - #62414 (Remove last use of mem::uninitialized in SGX)

Failed merges:

r? @ghost
@bors bors merged commit e45bbaf into rust-lang:master Jul 5, 2019
@pvdrz pvdrz deleted the ecx-memory-extra branch July 6, 2019 03:31
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.

4 participants