forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 38
Closed
Description
I tried this code:
extern "C" {
fn vsnprintf(s: *mut c_char, n: usize, format: *const c_char, ap: VaList) -> c_int;
}Calling the above function with this signature crashes.
Instead, replacing VaList with VaListImpl works.
extern "C" {
fn vsnprintf(s: *mut c_char, n: usize, format: *const c_char, ap: VaListImpl) -> c_int;
}The underlying issue seems that VaList should contain 3 u32 fields instead of being single pointer sized.
Details in PR #238
Meta
rustc --version --verbose:
rustc 1.81.0-nightly (02368e90f 2024-09-03) (1.81.0.0)
binary: rustc
commit-hash: 02368e90f28c216258b47072a65cb6b4991fc0ed
commit-date: 2024-09-03
host: x86_64-unknown-linux-gnu
release: 1.81.0-nightly
LLVM version: 17.0.1
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done