Commit b436f04
Guillaume Lessard
fix(cuda): c_char is unsigned on aarch64, so the device-name buffer broke
A real portability bug, not a CI quirk. `cuda_batch.rs` declared the
cuDeviceGetName buffer as `[0i8; 256]`. `c_char` is signed on x86_64 and
UNSIGNED on aarch64, so that hardcodes an x86 assumption and the aarch64 build
fails with two E0308s: "expected *mut u8, found *mut i8" at the FFI call, and
the same at CStr::from_ptr. Use std::os::raw::c_char so the buffer follows
whatever the C ABI says a char is on the target.
No effect on x86_64, where c_char is i8 - verified by rebuilding
--no-default-features --features abi3,cuda locally.
Only visible because the aarch64 wheel got far enough to compile the crate. It
could not before: ring's asm_base.h was hard-erroring on a missing __ARM_ARCH,
which hid everything behind it. Fixing that exposed this.
Secrets re-packed and uploaded (archive 6fbb2f6b); src/* is gitignored, so the
fix reaches CI and the wheels only through them.1 parent ef407cb commit b436f04
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments