Skip to content

Commit ec04def

Browse files
author
Oliver Schneider
committed
WIP, waiting for align_offset PR in rust
1 parent 8c24302 commit ec04def

File tree

5 files changed

+14
-48
lines changed

5 files changed

+14
-48
lines changed

Cargo.lock

-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ cargo_miri = ["cargo_metadata"]
3434

3535
[dev-dependencies]
3636
compiletest_rs = { version = "0.2.10", features = ["tmp"] }
37-
home = "0.3"
3837

3938
[workspace]
4039
exclude = ["xargo", "cargo-miri-test", "rustc_tests"]

appveyor.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ install:
1515
- if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
1616
- rustc -V
1717
- cargo -V
18-
- set RUSTFLAGS=-Zalways-encode-mir -Zmir-emit-validate=1
1918
- rustup component add rust-src
2019
- cargo install --git https://github.com/japaric/xargo.git
2120
- cd xargo
21+
- set RUSTFLAGS=-Zalways-encode-mir -Zmir-emit-validate=1
2222
- xargo build
23+
- set RUSTFLAGS=
2324
- cd ..
2425

2526
build: false

miri/fn_call.rs

+6
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,12 @@ impl<'a, 'tcx> EvalContextExt<'tcx> for EvalContext<'a, 'tcx, super::Evaluator>
634634
let bool = self.tcx.types.bool;
635635
self.write_primval(dest, PrimVal::from_bool(false), bool)?;
636636
}
637+
"std::sys::imp::c::::AddVectoredExceptionHandler" |
638+
"std::sys::imp::c::::SetThreadStackGuarantee" => {
639+
let usize = self.tcx.types.usize;
640+
// any non zero value works for the stdlib. This is just used for stackoverflows anyway
641+
self.write_primval(dest, PrimVal::Bytes(1), usize)?;
642+
},
637643
_ => return err!(NoMirFor(path)),
638644
}
639645

tests/compiletest.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(slice_concat_ext)]
22

33
extern crate compiletest_rs as compiletest;
4-
extern crate home;
54

65
use std::slice::SliceConcatExt;
76
use std::path::{PathBuf, Path};
@@ -50,7 +49,7 @@ fn compile_fail(sysroot: &Path, path: &str, target: &str, host: &str, fullmir: b
5049
// skip fullmir on nonhost
5150
return;
5251
}
53-
let sysroot = home::home_dir().unwrap()
52+
let sysroot = std::env::home_dir().unwrap()
5453
.join(".xargo")
5554
.join("HOST");
5655
config.target_rustcflags = Some(format!("--sysroot {}", sysroot.to_str().unwrap()));
@@ -107,9 +106,10 @@ fn miri_pass(path: &str, target: &str, host: &str, fullmir: bool, opt: bool) {
107106
// skip fullmir on nonhost
108107
return;
109108
}
110-
let sysroot = home::home_dir().unwrap()
109+
let sysroot = std::env::home_dir().unwrap()
111110
.join(".xargo")
112111
.join("HOST");
112+
113113
flags.push(format!("--sysroot {}", sysroot.to_str().unwrap()));
114114
}
115115
if opt {
@@ -180,9 +180,9 @@ fn run_pass_miri(opt: bool) {
180180
let sysroot = get_sysroot();
181181
let host = get_host();
182182

183-
for_all_targets(&sysroot, |target| {
184-
miri_pass("tests/run-pass", &target, &host, false, opt);
185-
});
183+
//for_all_targets(&sysroot, |target| {
184+
// miri_pass("tests/run-pass", &target, &host, false, opt);
185+
//});
186186
miri_pass("tests/run-pass-fullmir", &host, &host, true, opt);
187187
}
188188

0 commit comments

Comments
 (0)