Test miri on mac os

This commit is contained in:
Oliver Schneider 2017-07-19 15:06:21 +02:00 committed by Oliver Schneider
parent 6fdee31f2f
commit 20c2e0bede
No known key found for this signature in database
GPG key ID: 1D5CB4FC597C3004
6 changed files with 22 additions and 2 deletions

View file

@ -1,8 +1,17 @@
language: rust
cache: cargo
os:
- osx
- linux
rust:
- nightly
before_script:
# mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- rvm get stable
# actual travis code
- export PATH=$HOME/.local/bin:$PATH
- rustup target add i686-unknown-linux-gnu
- rustup target add i686-pc-windows-gnu

View file

@ -531,9 +531,10 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
// Return success (0)
self.write_null(dest, dest_ty)?;
}
"_tlv_atexit" => {
// TODO: handle it
}
return err!(Unimplemented("can't interpret with full mir for osx target".to_owned()));
},
// Stub out all the other pthread calls to just return 0
link_name if link_name.starts_with("pthread_") => {
@ -541,6 +542,12 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
self.write_null(dest, dest_ty)?;
}
"mmap" => {
// This is a horrible hack, but well... the guard page mechanism calls mmap and expects a particular return value, so we give it that value
let addr = self.into_ptr(args[0].value)?;
self.write_ptr(dest, addr, dest_ty)?;
}
_ => {
return err!(Unimplemented(
format!("can't call C ABI function: {}", link_name),

View file

@ -1,4 +1,5 @@
//ignore-msvc
//ignore-macos
use std::panic::{catch_unwind, AssertUnwindSafe};
fn main() {

View file

@ -1,4 +1,5 @@
//ignore-msvc
//ignore-macos
fn main() {
println!("Hello {}", 13);
}

View file

@ -1,4 +1,5 @@
//ignore-msvc
//ignore-macos
fn main() {
println!("Hello, world!");
}

View file

@ -9,6 +9,7 @@
// except according to those terms.
//ignore-msvc
//ignore-macos
#![feature(box_syntax)]
trait T {