Open
Description
I have a program written in C and Rust. This program has a function that is variadic and written in C. To enable testing my Rust code, I needed to mock this function using the #[feature(c_variadic)]
unstable feature.
This means I have a function in my test code defined like the following:
pub unsafe extern "C" fn variadic_fn(
some_arg: *const c_char,
mut args: ...
) {
...
}
When running Miri on my test code, I'm greeted with the following error:
error: Undefined Behavior: calling a function with argument of type std::ffi::VaListImpl passing data of type *const i8