-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Disable SwiftCompilerSources for Windows ARM64. #74432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please test |
CC: @etcwilde @shahmishal |
@eeckstein are you able to look into the segfault here (presumably a miscompile)? The whole point of those two PRs was so that SwiftCompilerSources is built everywhere, which this would be regressing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of reverting the enablement of SwiftCompilerSources on Windows, you should just disable SwiftCompilerSources on ARM64-Windows (as a temporary workaround).
Otherwise we will not catch SwiftCompilerSources regression on X86 Windows during PR testing
Unfortunately not. I don't have the environment to do so. Also, this is a C++ interop or LLVM issue - which I'm not familiar with. |
@eeckstein How do we disable SwiftCompilerSources on ARM64-Windows? |
|
But please check first if the recently merged #74512 did fix the issue |
Yeah will do! |
@eeckstein #74512 didn't seem to fix the issue. Updated this PR to disable SwiftCompilerSources for Windows/ARM64 which fixes the issue. PTAL. |
Are you building Swift 6 or main? The patch for Swift 6 hasn't landed yet and it looks like main is building because there are |
I'm building main |
Hmm, that's a bummer. At least it looks like the arm64-main CI is working though: https://ci-external.swift.org/job/swift-main-windows-toolchain-arm64/. What part am I missing here? |
The build works fine. The issue is at runtime and that the compiler binary from the build crashes right after it's launched and it cannot even compile a hello world program. |
If you're blocked on this Then hopefully this will temporarily unblock you |
@atrick Thanks for the info! #74599 seems to change the error to the following locally for me. So it may be fixing an error but the compiler still crashes.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the title of the PR is kind of wrong. Shouldn't it be "disable SwiftCompilerSources..."?
This fixes the Windows ARM64 toolchain segfault issue in the official build: https://download.swift.org/development/windows10-arm64/swift-DEVELOPMENT-SNAPSHOT-2024-06-03-a/swift-DEVELOPMENT-SNAPSHOT-2024-06-03-a-windows10-arm64.exe
Yes, fixed. |
@hjyamauchi Since you can reproduce the crash locally, can you try to figure out where it crashes exactly. The crashlog doesn't have symbol information, unfortunately. It looks like an assert is triggering. Could you try to find which assert it is? |
Sure. I think this is the fatal error in the LetPropertyLowering pass.
|
Can you try to run the compiler with |
It segfaults in BooleanLiteralFolding:
|
Also, can you printf the integer value of the silstage in |
I'd be happy to help debug further but does it seem like we want to have this PR merged for now (once my local testing passes)? @eeckstein |
Interesting. BooleanLiteralFolding runs before LetPropertyLowering |
Yes, you can merge it |
The integer value of the silstage is -1583311848 (0xa1a09418) as follows. It looks like a miscompile of some sort.
|
As my local testing of this PR was successful, I'll try to merge this. |
@swift-ci Please test |
Thanks! It looks like the
|
Thanks for merging this. Yes, I'm rebuilding it with your experiment patch. |
@eeckstein This is what I get with the patch:
With
The patch
where the checkout is at head
|
Thanks! looks like the passInvocation pointer is fine. If you are motivated you can try to track down why we are getting the wrong value of sil-stage. E.g. is the SILModule pointer valid, etc. |
Yeah I'll see what I can do! |
This fixes the Windows ARM64 toolchain segfault issue in the official build: https://download.swift.org/development/windows10-arm64/swift-DEVELOPMENT-SNAPSHOT-2024-06-03-a/swift-DEVELOPMENT-SNAPSHOT-2024-06-03-a-windows10-arm64.exe