diff --git a/src/eval.rs b/src/eval.rs index 95c24f0171..511163a2e7 100644 --- a/src/eval.rs +++ b/src/eval.rs @@ -130,7 +130,7 @@ pub struct MiriConfig { /// Whether Stacked Borrows retagging should recurse into fields of datatypes. pub retag_fields: bool, /// The location of a shared object file to load when calling external functions - /// TODO! consider allowing users to specify paths to multiple SO files, or to a directory + /// FIXME! consider allowing users to specify paths to multiple SO files, or to a directory pub external_so_file: Option, } diff --git a/src/shims/ffi_support.rs b/src/shims/ffi_support.rs index 3bc4940451..f1ae1e7d3f 100644 --- a/src/shims/ffi_support.rs +++ b/src/shims/ffi_support.rs @@ -149,7 +149,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx }, _ => {} } - // TODO ellen! deal with all the other return types + // FIXME ellen! deal with all the other return types throw_unsup_format!("unsupported return type to external C function: {:?}", link_name); } } @@ -245,6 +245,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx #[derive(Debug, Clone)] /// Enum of supported arguments to external C functions. +// We introduce this enum instead of just calling `ffi::arg` and storing a list +// of `libffi::high::Arg` directly, because the `libffi::high::Arg` just wraps a reference +// to the value it represents: https://docs.rs/libffi/latest/libffi/high/call/struct.Arg.html +// and we need to store a copy of the value, and pass a reference to this copy to C instead. pub enum CArg { /// 8-bit signed integer. Int8(i8),