From a66f622a98cbfed0f32b38af64fa68b8fad12cd7 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Sep 2017 09:55:17 +0200 Subject: [PATCH 1/5] rustup --- miri/bin/miri.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miri/bin/miri.rs b/miri/bin/miri.rs index 9b8790379d8e..65f855a513f7 100644 --- a/miri/bin/miri.rs +++ b/miri/bin/miri.rs @@ -11,6 +11,7 @@ extern crate log; use rustc::session::Session; +use rustc::middle::cstore::CrateStore; use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls}; use rustc_driver::driver::{CompileState, CompileController}; use rustc::session::config::{self, Input, ErrorOutputType}; @@ -64,11 +65,12 @@ fn late_callback( &mut self, matches: &getopts::Matches, sess: &Session, + cstore: &CrateStore, input: &Input, odir: &Option, ofile: &Option, ) -> Compilation { - self.default.late_callback(matches, sess, input, odir, ofile) + self.default.late_callback(matches, sess, cstore, input, odir, ofile) } fn build_controller( &mut self, From 91d9b83db26676bd0d178ceb9abfc53cae3907bc Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Sep 2017 10:00:37 +0200 Subject: [PATCH 2/5] validation: remove a hack that is no longer necessary --- src/librustc_mir/interpret/validation.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/librustc_mir/interpret/validation.rs b/src/librustc_mir/interpret/validation.rs index 251bd71ffcef..23bb0d8dbb78 100644 --- a/src/librustc_mir/interpret/validation.rs +++ b/src/librustc_mir/interpret/validation.rs @@ -398,23 +398,6 @@ fn validate( } } - // HACK: For now, bail out if we hit a dead local during recovery (can happen because sometimes we have - // StorageDead before EndRegion due to https://github.com/rust-lang/rust/issues/43481). - // TODO: We should rather fix the MIR. - match query.lval.1 { - Lvalue::Local { frame, local } => { - let res = self.stack[frame].get_local(local); - match (res, mode) { - (Err(EvalError { kind: EvalErrorKind::DeadLocal, .. }), - ValidationMode::Recover(_)) => { - return Ok(()); - } - _ => {} - } - } - _ => {} - } - query.ty = self.normalize_type_unerased(&query.ty); trace!("{:?} on {:?}", mode, query); From 24e45de9539c9b3cf0ef1c888df63dacb8fbbb14 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Sep 2017 10:04:28 +0200 Subject: [PATCH 3/5] travis: more consistent cargo flags (--locked, --release) --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d42ef2287af3..4ef07db09026 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,9 @@ script: xargo/build.sh - | # Test plain miri - cargo build --locked --release --features "cargo_miri" && - cargo test --release --all && - cargo install --features "cargo_miri" + cargo build --locked --release --all-features && + cargo test --locked --release --all-features --all && + cargo install --locked --release --all-features - | # Test cargo miri cd cargo-miri-test && @@ -27,7 +27,7 @@ script: cd .. - | # and run all tests with full mir - MIRI_SYSROOT=~/.xargo/HOST cargo test --release + MIRI_SYSROOT=~/.xargo/HOST cargo test --locked --release - | # test that the rustc_tests binary compiles cd rustc_tests && From 7ec04cb676be3ca9d99d829b61eec0cd38ba5ed5 Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Thu, 14 Sep 2017 10:34:07 +0200 Subject: [PATCH 4/5] `cargo install` only takes `--debug`, not `--release` --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ef07db09026..86577702e96d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ script: # Test plain miri cargo build --locked --release --all-features && cargo test --locked --release --all-features --all && - cargo install --locked --release --all-features + cargo install --locked --all-features - | # Test cargo miri cd cargo-miri-test && From ca0f063489d61e14b72cfb46e9d5e0403e361af6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 14 Sep 2017 10:39:41 +0200 Subject: [PATCH 5/5] fix rustc_tests build --- rustc_tests/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rustc_tests/src/main.rs b/rustc_tests/src/main.rs index d1f2f07aaaa6..819721c1cd0f 100644 --- a/rustc_tests/src/main.rs +++ b/rustc_tests/src/main.rs @@ -13,6 +13,7 @@ use rustc::session::Session; +use rustc::middle::cstore::CrateStore; use rustc_driver::{Compilation, CompilerCalls, RustcDefaultCalls}; use rustc_driver::driver::{CompileState, CompileController}; use rustc::session::config::{self, Input, ErrorOutputType}; @@ -52,11 +53,12 @@ fn late_callback( &mut self, matches: &getopts::Matches, sess: &Session, + cstore: &CrateStore, input: &Input, odir: &Option, ofile: &Option ) -> Compilation { - self.default.late_callback(matches, sess, input, odir, ofile) + self.default.late_callback(matches, sess, cstore, input, odir, ofile) } fn build_controller(&mut self, sess: &Session, matches: &getopts::Matches) -> CompileController<'a> { let mut control = self.default.build_controller(sess, matches);