Skip to content

Commit 5854fed

Browse files
committed
Auto merge of #30183 - retep998:min-align, r=alexcrichton
This fixes it so the Rust allocator on Windows 32-bit doesn't think the system allocator is aligned to 16 when it is really only aligned to 8.
2 parents c7d5832 + 098f4fb commit 5854fed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/liballoc_system/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ extern crate libc;
2929
// The minimum alignment guaranteed by the architecture. This value is used to
3030
// add fast paths for low alignment values. In practice, the alignment is a
3131
// constant at the call site and the branch will be optimized out.
32-
#[cfg(all(any(target_arch = "arm",
32+
#[cfg(all(any(target_arch = "x86",
33+
target_arch = "arm",
3334
target_arch = "mips",
3435
target_arch = "mipsel",
3536
target_arch = "powerpc")))]
3637
const MIN_ALIGN: usize = 8;
37-
#[cfg(all(any(target_arch = "x86",
38-
target_arch = "x86_64",
38+
#[cfg(all(any(target_arch = "x86_64",
3939
target_arch = "aarch64")))]
4040
const MIN_ALIGN: usize = 16;
4141

0 commit comments

Comments
 (0)