Files
rust/tests
Daniel Paoliello 14713e5af8 [aarch64][win] Pass oversized c-variadic args indirectly on Arm64EC
On Arm64EC the variadic portion of a c-variadic call must follow the MS
x64 ABI: any argument that does not fit in 8 bytes, or whose size is not
1, 2, 4, or 8 bytes, is passed by reference. rustc's `va_arg`
implementation already reads such arguments indirectly, but the caller
side in `aarch64::compute_abi_info` passed a scalar `i128` by value (it
is not an aggregate, so it bypassed `classify_arg`). The callee then
dereferenced the inline value as a pointer, causing an access violation
(0xC0000005) at runtime.

Mark variadic-tail arguments larger than 8 bytes, or whose size is not a
power of two, as indirect on Arm64EC so the caller and the `va_arg`
reader agree. Fixed arguments are unaffected: a fixed `i128` is still
passed by value, matching MSVC and Clang.

Add a codegen test verifying that a variadic `i128` is passed as a
pointer while a fixed `i128` is passed by value.
2026-07-16 10:47:53 -07:00
..
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 11:02:01 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00
2026-07-13 10:54:53 +02:00