Skip to content

Fix const eval bug breaking run-pass tests in Miri - #64100

Merged
bors merged 1 commit into
rust-lang:masterfrom
wesleywiser:fix_miri_const_eval
Sep 5, 2019
Merged

Fix const eval bug breaking run-pass tests in Miri#64100
bors merged 1 commit into
rust-lang:masterfrom
wesleywiser:fix_miri_const_eval

Conversation

@wesleywiser

Copy link
Copy Markdown
Member

PR #63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.

r? @oli-obk
cc @RalfJung

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2019
Comment threadsrc/librustc_mir/interpret/place.rs Outdated
PR rust-lang#63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.
@wesleywiser

Copy link
Copy Markdown
MemberAuthor

Fixed

@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Sep 4, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 46877e2 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 Sep 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…oli-obk
Fix const eval bug breaking run-pass tests in Miri
PR rust-lang#63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.
r? @oli-obk
cc @RalfJung
@CentrilCentril mentioned this pull request Sep 5, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…oli-obk
Fix const eval bug breaking run-pass tests in Miri
PR rust-lang#63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.
r? @oli-obk
cc @RalfJung
@CentrilCentril mentioned this pull request Sep 5, 2019
Centril added a commit to Centril/rust that referenced this pull request Sep 5, 2019
…oli-obk
Fix const eval bug breaking run-pass tests in Miri
PR rust-lang#63580 broke miri's ability to run the run-pass test suite with MIR
optimizations enabled. The issue was that we weren't properly handling
the substs and DefId associated with a Promoted value. This didn't break
anything in rustc because in rustc this code runs before the Inliner
pass which is where the DefId and substs can diverge from their initial
values. It broke Miri though because it ran this code again after
running the optimization pass.
r? @oli-obk
cc @RalfJung
@CentrilCentril mentioned this pull request Sep 5, 2019
bors added a commit that referenced this pull request Sep 5, 2019
Rollup of 11 pull requests
Successful merges:
- #62848 (Use unicode-xid crate instead of libcore)
- #63774 (Fix `window.hashchange is not a function`)
- #63930 (Account for doc comments coming from proc macros without spans)
- #64003 (place: Passing `align` = `layout.align.abi`, when also passing `layout`)
- #64030 (Fix unlock ordering in SGX synchronization primitives)
- #64041 (use TokenStream rather than &[TokenTree] for built-in macros)
- #64051 (Add x86_64-linux-kernel target)
- #64063 (Fix const_err with `-(-0.0)`)
- #64083 (Point at appropriate arm on type error on if/else/match with one non-! arm)
- #64100 (Fix const eval bug breaking run-pass tests in Miri)
- #64157 (Opaque type locations in error message for clarity.)
Failed merges:
r? @ghost
@bors
bors merged commit 46877e2 into rust-lang:masterSep 5, 2019
@RalfJung

Copy link
Copy Markdown
Member

@wesleywiser thanks a ton!
If you'd like, you could also submit a PR for Miri to re-enable the optimized run-pass tests. That would be a matter of enabling this line:

https://github.com/rust-lang/miri/blob/7095a3bb68d0462df28a9ac0b56db155bfd3afcf/tests/compiletest.rs#L125

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.

5 participants

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