-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterC-bugCategory: This is a bug.Category: This is a bug.
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
boozookboozook
Metadata
Metadata
Assignees
Labels
A-interpreterArea: affects the core interpreterArea: affects the core interpreterC-bugCategory: This is a bug.Category: This is a bug.