Skip to content

Commit b436f04

Browse files
author
Guillaume Lessard
committed
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

File tree

rust_core.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
36d3413c9a11d22eda4bbe7637e6615f2615dd41e3b60012e977e7ce7efc6077
1+
6fbb2f6b11f3b49e77291c2081f621e1299c2c001bdd2a218326e827d8d068a4

0 commit comments

Comments
 (0)