Closed as not planned
Description
Yay more confusion with variadics
https://miri.saethlin.dev/ub?crate=px4&version=0.2.4
error: Undefined Behavior: calling a c-variadic function via a non-variadic call site, or vice versa
--> /root/build/src/logging.rs:21:3
|
21 | / px4_log_raw(
22 | | level as i32,
23 | | "%.*s\0".as_ptr(),
24 | | message.len() as i32,
25 | | message.as_ptr(),
26 | | );
| |_________^ calling a c-variadic function via a non-variadic call site, or vice versa
|
I don't know what a variadic call site means. But this looks like a perfectly valid call to me, all the variadic arguments fit in a usize
. It's not possible to type check a variadic call without knowing how the callee is going to interpret things, so I feel like we should either be quiet on the issue or reject them altogether?
Metadata
Metadata
Assignees
Labels
No labels