diff --git a/Cargo.lock b/Cargo.lock index 28be08c467cd..a7303421808f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "abort_on_panic" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955f37ac58af2416bac687c8ab66a4ccba282229bd7422a28d2281a5e66a6116" - [[package]] name = "addr2line" version = "0.17.0" @@ -314,26 +308,6 @@ version = "0.2.112" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" -[[package]] -name = "libffi" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e08093a2ddeee94bd0c830a53d895ff91f1f3bb0f9b3c8c6b00739cdf76bc1d" -dependencies = [ - "abort_on_panic", - "libc", - "libffi-sys", -] - -[[package]] -name = "libffi-sys" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4106b7f09d7b87d021334d5618fac1dfcfb824d4c5fe111ff0074dfd242e15" -dependencies = [ - "cc", -] - [[package]] name = "libloading" version = "0.7.3" @@ -418,7 +392,6 @@ dependencies = [ "getrandom", "lazy_static", "libc", - "libffi", "libloading", "log", "measureme", diff --git a/Cargo.toml b/Cargo.toml index 0a3dfc2a84e3..c0a217b64116 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ doctest = false # and no doc tests [dependencies] getrandom = { version = "0.2", features = ["std"] } env_logger = "0.9" -libffi = "3.0.0" +#FIXME(miri#2526): libffi = "3.0.0" libloading = "0.7" log = "0.4" shell-escape = "0.1.4" diff --git a/README.md b/README.md index 8e96338a865f..c7a3200dbd90 100644 --- a/README.md +++ b/README.md @@ -346,17 +346,6 @@ to Miri failing to detect cases of undefined behavior in a program. this flag is **unsound**. * `-Zmiri-disable-weak-memory-emulation` disables the emulation of some C++11 weak memory effects. -* `-Zmiri-extern-so-file=` is an experimental flag for providing support - for FFI calls. Functions not provided by that file are still executed via the usual Miri shims. - **WARNING**: If an invalid/incorrect `.so` file is specified, this can cause undefined behaviour in Miri itself! - And of course, Miri cannot do any checks on the actions taken by the external code. - Note that Miri has its own handling of file descriptors, so if you want to replace *some* functions - working on file descriptors, you will have to replace *all* of them, or the two kinds of - file descriptors will be mixed up. - This is **work in progress**; currently, only integer arguments and return values are - supported (and no, pointer/integer casts to work around this limitation will not work; - they will fail horribly). - Follow [the discussion on supporting other types](https://github.com/rust-lang/miri/issues/2365). * `-Zmiri-measureme=` enables `measureme` profiling for the interpreted program. This can be used to find which parts of your program are executing slowly under Miri. The profile is written out to a file with the prefix ``, and can be processed diff --git a/src/shims/foreign_items.rs b/src/shims/foreign_items.rs index b94b6bbb2b8b..bd46e4ae80e2 100644 --- a/src/shims/foreign_items.rs +++ b/src/shims/foreign_items.rs @@ -23,7 +23,7 @@ use rustc_target::{ use super::backtrace::EvalContextExt as _; use crate::helpers::{convert::Truncate, target_os_is_unix}; -use crate::shims::ffi_support::EvalContextExt as _; +//FIXME(miri#2526): use crate::shims::ffi_support::EvalContextExt as _; use crate::*; /// Returned by `emulate_foreign_item_by_name`. @@ -375,9 +375,9 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // An Ok(false) here means that the function being called was not exported // by the specified `.so` file; we should continue and check if it corresponds to // a provided shim. - if this.call_external_c_fct(link_name, dest, args)? { + /*FIXME(miri#2526): if this.call_external_c_fct(link_name, dest, args)? { return Ok(EmulateByNameResult::NeedsJumping); - } + }*/ } // When adding a new shim, you should follow the following pattern: diff --git a/src/shims/mod.rs b/src/shims/mod.rs index ee2145db7e1b..8179d09defe3 100644 --- a/src/shims/mod.rs +++ b/src/shims/mod.rs @@ -1,7 +1,7 @@ #![warn(clippy::integer_arithmetic)] mod backtrace; -pub mod ffi_support; +//FIXME(miri#2526): pub mod ffi_support; pub mod foreign_items; pub mod intrinsics; pub mod unix; diff --git a/tests/compiletest.rs b/tests/compiletest.rs index 6b5668e2d6c4..0e492c3eecdf 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -212,8 +212,8 @@ fn main() -> Result<()> { ui(Mode::Panic, "tests/panic", WithDependencies)?; ui(Mode::Fail { require_patterns: true }, "tests/fail", WithDependencies)?; if cfg!(target_os = "linux") { - ui(Mode::Pass, "tests/extern-so/pass", WithoutDependencies)?; - ui(Mode::Fail { require_patterns: true }, "tests/extern-so/fail", WithDependencies)?; + //FIXME(miri#2526): ui(Mode::Pass, "tests/extern-so/pass", WithoutDependencies)?; + //FIXME(miri#2526): ui(Mode::Fail { require_patterns: true }, "tests/extern-so/fail", WithDependencies)?; } Ok(())