swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.29k stars 10.33k forks source link

Compiler crash building swiftpm with Windows ARM toolchain #75809

Open dschaefer2 opened 1 month ago

dschaefer2 commented 1 month ago

Description

Compiler crash using the Aug 7 Windows ARM 6.0 toolchain, building swiftpm main.

build.txt

Reproduction

Building the main branch of swiftpm.

Expected behavior

No crash :).

Environment

Swift version 6.0-dev (LLVM 73a346c9caf32cc, Swift 3e21fc6610cc917) Target: aarch64-unknown-windows-msvc

Additional information

No response

dschaefer2 commented 1 month ago

The crash does not happen with the x86_64 Windows toolchain. Only ARM.

compnerd commented 1 month ago

Interesting! This should be a pretty generic thing, I think that we are silently failing the verifier on Darwin.

hjyamauchi commented 3 weeks ago

A slightly simpler reproduction:

git clone https://github.com/jpsim/Yams -b 5.0.6
cd Yams
swift build

This reproduces with the 2024-08-07 build but not with the 2024-07-02 build.

This doesn't reproduce with the Windows X64 build.

hjyamauchi commented 3 weeks ago

I was able to reproduce this error with a local Windows X64 build with SwiftCompilerSources disabled.

@eeckstein, is the SwiftCompilerSources-disabled compiler no longer CI-tested (or supported?) outside of Windows ARM64? CC @compnerd

eeckstein commented 3 weeks ago

@eeckstein, is the SwiftCompilerSources-disabled compiler no longer CI-tested (or supported?) outside of Windows ARM64?

Correct. Unfortunately SwiftCompilerSources are disabled on Windows arm64 because of a miscompile which let the compiler crash immediately (https://github.com/swiftlang/swift/issues/74866). I hope that someone with low-level debugging experience on Windows can take a look and fix this problem.

hjyamauchi commented 3 weeks ago

Ok, will see what I can do :)