Open
Description
#[repr(align(16384))]
struct HighAlignment;
static EXAMPLE: HighAlignment = const { HighAlignment };
fn main() {}
$ cargo build --target x86_64-pc-windows-gnu
...
error: could not compile `cringe` (bin "cringe"); 2 warnings emitted
Caused by:
process didn't exit successfully: `/home/purplesyringa/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rustc --crate-name cringe --edition=2021 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=211 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=2b980327f571f145 -C extra-filename=-97496ab9b6118996 --out-dir /home/purplesyringa/cringe/target/x86_64-pc-windows-gnu/debug/deps --target x86_64-pc-windows-gnu -C incremental=/home/purplesyringa/cringe/target/x86_64-pc-windows-gnu/debug/incremental -L dependency=/home/purplesyringa/cringe/target/x86_64-pc-windows-gnu/debug/deps -L dependency=/home/purplesyringa/cringe/target/debug/deps` (signal: 4, SIGILL: illegal instruction)
Also reproduces on other ABIs, also gives STATUS_ILLEGAL_INSTRUCTION
when building on Windows. Also applies to thread locals. Something something IMAGE_SCN_ALIGN_
stops at 8k and LLVM fails an assertion?
Meta
rustc --version --verbose
:
rustc 1.86.0-nightly (419b3e2d3 2025-01-15)
binary: rustc
commit-hash: 419b3e2d3e350822550eee0e82eeded4d324d584
commit-date: 2025-01-15
host: x86_64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.6
@rustbot label +I-crash +T-compiler +A-LLVM +E-needs-investigation +O-windows
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: alignment control (`repr(align(N))` and so on)Area: the `#[repr(stuff)]` attributeCategory: This is a bug.Call for partcipation: This issues needs some investigation to determine current statusIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Operating system: WindowsRelevant to the compiler team, which will review and decide on the PR/issue.