From c5fc4d9d11a97ce4cf75615d15649f1f3c45608c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 10 Dec 2018 10:19:44 +0100 Subject: [PATCH] WIP: fix CI --- .travis.yml | 14 ++++++++++---- appveyor.yml | 3 +-- src/fn_call.rs | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac3f16ce13..ecf413c64e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,13 +9,16 @@ cache: os: - linux - osx +dist: xenial before_script: +# install extra stuff for cross-compilation +- if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt install gcc-multilib; fi # macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165) - if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi # Compute the rust version we use. We do not use "language: rust" to have more control here. - | - if [ "$TRAVIS_EVENT_TYPE" = cron ]; then + if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then RUST_TOOLCHAIN=nightly else RUST_TOOLCHAIN=$(cat rust-version) @@ -38,10 +41,13 @@ script: cargo build --release --all-features --all-targets && cargo install --all-features --force --path . - | - # Get ourselves a MIR-full libstd + # Get ourselves a MIR-full libstd for the host and a foreign architecture cargo miri setup && - cargo miri setup --target i686-unknown-linux-gnu && - cargo miri setup --target i686-apple-darwin + if [[ "$TRAVIS_OS_NAME" == osx ]]; then + cargo miri setup --target i686-apple-darwin + else + cargo miri setup --target i686-unknown-linux-gnu + fi - | # Test miri with full MIR, on the host and other architectures MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features && diff --git a/appveyor.yml b/appveyor.yml index 1f38b848c0..3ae6915624 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -27,9 +27,8 @@ build: false test_script: - set RUSTFLAGS=-g - set RUST_BACKTRACE=1 - # Test plain miri + # Build miri - cargo build --release --all-features --all-targets - - cargo test --release --all-features # Get ourselves a MIR-full libstd, and use it henceforth - cargo run --release --all-features --bin cargo-miri -- miri setup - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST diff --git a/src/fn_call.rs b/src/fn_call.rs index e9d3255a5b..08f491846e 100644 --- a/src/fn_call.rs +++ b/src/fn_call.rs @@ -583,7 +583,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo self.write_null(dest)?; } - "mmap" => { + "mmap" | "mmap$UNIX2003" => { // 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.read_scalar(args[0])?.not_undef()?; self.write_scalar(addr, dest)?;