Skip to content

STATUS_ACCESS_VIOLATION when cross-compiling for nightly-2024-02-19-aarch64-pc-windows-msvc when compiling num-traits #121367

Closed
@chyyran

Description

@chyyran

Minimal reproducible example

fn main() {
    println!("Hello, world!");
}
[package]
name = "min-test"
version = "0.1.0"
edition = "2021"

[dependencies]
num-traits = "0.2.18"

cargo build --target aarch64-pc-windows-msvc

I expected to see this happen:
cargo builds the example

Instead, this happened:

PS F:\coding\min-test> cargo build --target aarch64-pc-windows-msvc                                             
   Compiling autocfg v1.1.0
   Compiling num-traits v0.2.18                                                                                                                                                                                                                                                                                                                                                                                                    
error: could not compile `num-traits` (lib)                                                                                                                                                                                                                                                                                                                                                                                        

Caused by:
  process didn't exit successfully: `rustc --crate-name num_traits --edition=2018 D:\Runtime\Rust\cargo\registry\src\index.crates.io-6f17d22bba15001f\num-traits-0.2.18\src\lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=419 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg "feature=\"default\"" --cfg "feature=\"std\"" -C met
adata=30bc9611b16064ab -C extra-filename=-30bc9611b16064ab --out-dir F:\coding\min-test\target\aarch64-pc-windows-msvc\debug\deps --target aarch64-pc-windows-msvc -L dependency=F:\coding\min-test\target\aarch64-pc-windows-msvc\debug\deps -L dependency=F:\coding\min-test\target\debug\deps --cap-lints allow --cfg has_to_int_unchecked --cfg has_reverse_bits --cfg has_leading_trailing_ones --cfg has_div_euclid --cfg has_copysign --cfg has_is_subnormal --cfg has_total_cmp --cfg has_int_to_from_bytes --cfg has_float_to_from_bytes` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

The last working compiler that I've tried was nightly-2024-01-15-aarch64-pc-windows-msvc. I haven't attempted to bisect since then so there could be some compilers working after 2024-01-15.

rustc 1.78.0-nightly (3246e7951 2024-02-19)
binary: rustc
commit-hash: 3246e79513cb89ddbfc0f21cb5a877e5b321dcc5
commit-date: 2024-02-19
host: x86_64-pc-windows-msvc
release: 1.78.0-nightly
LLVM version: 18.1.0

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions