]> git.lizzy.rs Git - rust.git/commitdiff
Test miri on mac os
authorOliver Schneider <git-spam-no-reply9815368754983@oli-obk.de>
Wed, 19 Jul 2017 13:06:21 +0000 (15:06 +0200)
committerOliver Schneider <git-no-reply-9879165716479413131@oli-obk.de>
Fri, 11 May 2018 09:29:18 +0000 (11:29 +0200)
.travis.yml
src/fn_call.rs
tests/run-pass-fullmir/catch.rs
tests/run-pass-fullmir/format.rs
tests/run-pass-fullmir/hello.rs
tests/run-pass-fullmir/issue-3794.rs

index 360b741106e58284080e5d737f4b3d2fdd20be0f..6a987f93748c130e958190ee832115ba7c978460 100644 (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
index c862238e889c16543d167041c1b7efe824b5cc09..2b4e7b73662847721fdb9969088a22569e1536c3 100644 (file)
@@ -531,9 +531,10 @@ fn call_c_abi(
                 // 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 @@ fn call_c_abi(
                 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),
index 490f17d4cf4f52305f3a6d24d6b38ed55e64cd68..60c86c99e9aaf9d67924ce09ea5bb5e86b8727c3 100644 (file)
@@ -1,4 +1,5 @@
 //ignore-msvc
+//ignore-macos
 use std::panic::{catch_unwind, AssertUnwindSafe};
 
 fn main() {
index a14d7054e72902011bc64282513b53065d132b6f..59af803b59f0f1dd18d6820374965b07903927c8 100644 (file)
@@ -1,4 +1,5 @@
 //ignore-msvc
+//ignore-macos
 fn main() {
     println!("Hello {}", 13);
 }
index 986efcaf9005a830817163df554b98800274178b..a0d73733bdfc8d28034ebebbdd171342b6f13a1f 100644 (file)
@@ -1,4 +1,5 @@
 //ignore-msvc
+//ignore-macos
 fn main() {
     println!("Hello, world!");
 }
index 8d55af58eeca8c8087b58f16674eec3c9582c040..8b653f0f95fc9ef6ae1bce52fbb0fbf760d0606d 100644 (file)
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 //ignore-msvc
+//ignore-macos
 #![feature(box_syntax)]
 
 trait T {