Skip to content

Commit

Permalink
temporarily disable validation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Jul 5, 2019
1 parent 9b58492 commit 4d76dd1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
10 changes: 9 additions & 1 deletion src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
Evaluator::new(),
);

// FIXME(https://github.com/rust-lang/miri/pull/803): no validation on Windows.
let target_os = ecx.tcx.tcx.sess.target.target.target_os.to_lowercase();
let validate = if target_os == "windows" {
false
} else {
config.validate
};

// FIXME: InterpretCx::new should take an initial MemoryExtra
ecx.memory_mut().extra = MemoryExtra::new(config.seed.map(StdRng::seed_from_u64), config.validate);
ecx.memory_mut().extra = MemoryExtra::new(config.seed.map(StdRng::seed_from_u64), validate);

let main_instance = ty::Instance::mono(ecx.tcx.tcx, main_id);
let main_mir = ecx.load_mir(main_instance.def)?;
Expand Down
5 changes: 3 additions & 2 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ fn miri_pass(path: &str, target: &str, opt: bool, noseed: bool) {
flags.push("-Zmir-opt-level=3".to_owned());
} else if !noseed {
// Run with intptrcast. Avoid test matrix explosion by doing either this or opt-level=3.
#[cfg(not(windows))] // FIXME re-enable on Windows
flags.push("-Zmiri-seed=".to_owned());
}

Expand Down Expand Up @@ -113,7 +112,9 @@ fn run_pass_miri(opt: bool) {
}

fn compile_fail_miri(opt: bool) {
compile_fail("tests/compile-fail", &get_target(), opt);
if !cfg!(windows) { // FIXME re-enable on Windows
compile_fail("tests/compile-fail", &get_target(), opt);
}
}

fn test_runner(_tests: &[&()]) {
Expand Down

0 comments on commit 4d76dd1

Please sign in to comment.