Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ serde_json = { version = "1.0", optional = true }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# native-lib dependencies
libffi = { version = "5.0.0", optional = true }
libffi = { version = "5.1.0", optional = true }
libloading = { version = "0.9", optional = true }
serde = { version = "1.0.219", features = ["derive"], optional = true }

Expand Down
7 changes: 7 additions & 0 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ pub struct MiriMachine<'tcx> {
pub native_lib: Vec<(libloading::Library, std::path::PathBuf)>,
#[cfg(not(all(unix, feature = "native-lib")))]
pub native_lib: Vec<!>,
/// A memory location for exchanging the current `ecx` pointer with native code.
#[cfg(all(unix, feature = "native-lib"))]
pub native_lib_ecx_interchange: &'static Cell<usize>,

/// Run a garbage collector for BorTags every N basic blocks.
pub(crate) gc_interval: u32,
Expand Down Expand Up @@ -790,6 +793,8 @@ impl<'tcx> MiriMachine<'tcx> {
lib_file_path.clone(),
)
}).collect(),
#[cfg(all(unix, feature = "native-lib"))]
native_lib_ecx_interchange: Box::leak(Box::new(Cell::new(0))),
#[cfg(not(all(unix, feature = "native-lib")))]
native_lib: config.native_lib.iter().map(|_| {
panic!("calling functions from native libraries via FFI is not supported in this build of Miri")
Expand Down Expand Up @@ -1026,6 +1031,8 @@ impl VisitProvenance for MiriMachine<'_> {
report_progress: _,
basic_block_count: _,
native_lib: _,
#[cfg(all(unix, feature = "native-lib"))]
native_lib_ecx_interchange: _,
gc_interval: _,
since_gc: _,
num_cpus: _,
Expand Down
32 changes: 0 additions & 32 deletions src/shims/native_lib/ffi.rs

This file was deleted.

Loading