diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-04-24 11:40:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-24 11:40:35 +0200 |
| commit | a8ebfb256af3d38338d4f26c6282e1984f18bcfc (patch) | |
| tree | dc46e23de4dd3e7224b161dcacc1ba08c895e37e /tests/codegen | |
| parent | 7f695232a80fa1833e2282f2577c5e1ff066bf39 (diff) | |
| parent | e702f960f58c2c03728dc6f5314f41beab88e47b (diff) | |
| download | rust-a8ebfb256af3d38338d4f26c6282e1984f18bcfc.tar.gz rust-a8ebfb256af3d38338d4f26c6282e1984f18bcfc.zip | |
Rollup merge of #139261 - RalfJung:msvc-align-mitigation, r=oli-obk
mitigate MSVC alignment issue on x86-32 This implements mitigation for https://github.com/rust-lang/rust/issues/112480 by stopping to emit `align` attributes on loads and function arguments when building for a win32 MSVC target. MSVC is known to not properly align `u64` and similar types, and claiming to LLVM that everything is properly aligned increases the chance that this will cause problems. Of course, the misalignment is still a bug, but we can't fix that bug, only MSVC can. Also add an errata note to the platform support page warning users about this known problem. try-job: `i686-msvc*`
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/align-struct.rs | 4 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-56927.rs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/codegen/align-struct.rs b/tests/codegen/align-struct.rs index cc65b08a922..402a184d4c0 100644 --- a/tests/codegen/align-struct.rs +++ b/tests/codegen/align-struct.rs @@ -1,5 +1,7 @@ //@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 -// +// 32bit MSVC does not align things properly so we suppress high alignment annotations (#112480) +//@ ignore-i686-pc-windows-msvc +//@ ignore-i686-pc-windows-gnu #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-56927.rs b/tests/codegen/issues/issue-56927.rs index a40718689b3..415ef073e03 100644 --- a/tests/codegen/issues/issue-56927.rs +++ b/tests/codegen/issues/issue-56927.rs @@ -1,4 +1,7 @@ //@ compile-flags: -C no-prepopulate-passes +// 32bit MSVC does not align things properly so we suppress high alignment annotations (#112480) +//@ ignore-i686-pc-windows-msvc +//@ ignore-i686-pc-windows-gnu #![crate_type = "rlib"] |
