You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows 6.2.1 x86_64 toolchain is resulting in exit code -1073741819 #85516
While debugging a vscode-swift issue swiftlang/vscode-swift#1937 I came to realize something is different with 6.2.1 toolchain on Windows. So we call swift --version and various other SwiftPM commands on extension activation to setup the development environment. With 6.2.1 we get the right STDOUT but exit code -1073741819 which I think indicates STATUS_ACCESS_VIOLATION.
PS > swift --version
Swift version 6.2.1 (swift-6.2.1-RELEASE)
Target: x86_64-unknown-windows-msvc
Build config: +assertions
PS > $LASTEXITCODE
-1073741819
Now I'm reproducing using the x86_64 toolchain on ARM64 Windows because for the longest time ARM64 toolchain did not work on Windows. I tried installing the ARM64 6.2.1 toolchain on Windows and the extension activates fine so I only reproduce with x86_64 toolchain on an ARM64 Windows but that worked as recently as 6.2.0. I downgraded to 6.2.0 and 6.1.3 with no issues, so think legit issue with the x86_64 toolchain for 6.2.1
@Steelskin was able to reproduce this under Parallels on ARM64. I think that this is likely a WONTFIX, as we should encourage people to use the ARM64 toolchain on ARM64. My suspicion is that the emulation layer does not support some of the instructions in the toolchain which results in the CPU fault resulting in the access violation.
More concerned that vscode CI jobs started to fail with 6.2.1 and that should be x86_64 so I'll see if I can find an x86_64 box to use later in the week to reproduce
Yeah, if it is a python version mismatch on LLDB, we should split this into two separate issues. We need a proper reproduction for the swift driver, but that is suspected to be the emulation layer/hardware compatibility.
can you get the output of path? Did you install Python 3.10.x?
I had Python 3.9.x installed from a loooong time ago. So, I uninstalled that and installed Python 3.10.11 via Python Install Manager, but encountered the same issue. Here's what my path looks like:
@matthewbastien seems that your Path does not contain Python. Can you restart your terminal emulator and see if it shows up? If so, I believe that LLDB should startup then. If it does, we should split up this issue into two separate threads.
I had Python 3.9.x installed from a loooong time ago. So, I uninstalled that and installed Python 3.10.11 via Python Install Manager, but encountered the same issue. Here's what my path looks like:
I see C:\Users\mbastien\AppData\Local\Python\bin in the screenshot.
@matthewbastien can you please run gcm python310.dll from your Powershell shell? If that returns nothing, python310.dll is not available. Otherwise, the issue is somewhere else.
Yeah, looks like powershell can't find the dll (and most likely LLDB as well):
python310.dll does exist in ~/AppData/Local/Python/pythoncore-3.10-64, but that isn't in Path. Only the bin folder that's used by Python Install Manager is there. Do we support Python installations from Python Install Manager, or should I just install Python 3.10 directly?
Also, the CI for the VS Code Swift extension is failing on Windows with Swift 6.2.1 because of this. In that instance we're using the 6.2.1 image from the swiftlang github actions repo. Does that image need updating to install Python 3.10.x?
Do we support Python installations from Python Install Manager, or should I just install Python 3.10 directly?
We only support a Python installation which is in the PATH. If Python Install Manager does not put python310.dll in the PATH, it's not supported. The only exception to that will be when swiftlang/swift-installer-scripts#447 is merged. It allows us to distribute a minimal Python install with the toolchain on Windows to avoid this unresolved python310.dll error.
Does that image need updating to install Python 3.10.x?
No we cannot use the swift-docker images, we run directly in the GitHub action agent, and I've checked and the Python version is the same as it's been for a while in that image. I don't want to lose sight that this started failing in our CI job where nothing in the setup is changed, but something about 6.2.1 is different and lldb-dap tests are failing.
We should probably raise a separate issue for the LLDB issue as we got 2 topics here.
regarding the original issue about the access violation
I think that this is likely a WONTFIX
Is that the official decision that x86_64 toolchain on ARM64 will no longer be a supported setup? For the longest time there were issues with the ARM64 toolchain that meant debugging (and maybe LSP) did not work in VS Code so we'll have to make sure the ARM64 toolchain is in fact working if x86_64 on ARM64 support is being dropped.
Is that the official decision that x86_64 toolchain on ARM64 will no longer be a supported setup? For the longest time there were issues with the ARM64 toolchain that meant debugging (and maybe LSP) did not work in VS Code so we'll have to make sure the ARM64 toolchain is in fact working if x86_64 on ARM64 support is being dropped.
If this is due to PRISM, then yes. PRISM doesn't support each feature of X86, and I don't think that we should be forced to pessimise the compiler for ARM64 compatibility. We have the native ARM64 toolchain so there is a good solution for the developers working on ARM64.
Hmm, I wonder what the difference is in the build. Can you grab the detailed build log for vcpkg @liamgmgit? Perhaps we can identify what the difference is and apply that.
I don't see the actual CMake invocation, which makes this difficult. It seems that there were a bunch of MinGW dependencies that were pulled in which makes this trickier. Also, I think that we are only interested in the release mode builds (or MinSizeRel).
It is likely that they are building mimalloc with a different set of flags, and I would like to understand what that set of flags are. We are not going to be able to change the way that we build - that is codified in https://github.com/swiftlang/swift/blob/main/utils/build.ps1#L2367-L2413. We can however adjust the configuration options based upon what we can learn from the build of mimalloc that vcpkg does. I'd also be willing to switch to using CMake instead of MSBuild if we can get that to properly cross-compile (X64 -> {X64,ARM64}, ARM64 -> {ARM64,X64}).
Activity
award999 commentedon Nov 14, 2025
@shahmishal
shahmishal commentedon Nov 14, 2025
cc: @compnerd
award999 commentedon Nov 14, 2025
Also worth noting this lines up perfectly with our nightly 6.2 Windows job starting to fail https://github.com/swiftlang/vscode-swift/actions/runs/19350317255/job/55360633338. Now IDK if the GitHub actions Windows runner is ARM64 or x86_64 so maybe there is a problem on x86_64 Windows as well
compnerd commentedon Nov 14, 2025
This isn't an installer issue, moving to swiftlang/swift
compnerd commentedon Nov 14, 2025
I cannot seem to reproduce this:
Can you verify that this occurs on x64 hardware natively? Can you provide information about the CPU that you are using?
award999 commentedon Nov 14, 2025
I'm using Parallels on macOS, I can try to track down an x86_64 box
compnerd commentedon Nov 14, 2025
@Steelskin was able to reproduce this under Parallels on ARM64. I think that this is likely a WONTFIX, as we should encourage people to use the ARM64 toolchain on ARM64. My suspicion is that the emulation layer does not support some of the instructions in the toolchain which results in the CPU fault resulting in the access violation.
Steelskin commentedon Nov 14, 2025
Running
swiftc.exeunder windbg shows that the access violation is here:My guess is that mimalloc does not work properly under the x64 emulation layer scenario.
award999 commentedon Nov 17, 2025
More concerned that vscode CI jobs started to fail with 6.2.1 and that should be x86_64 so I'll see if I can find an x86_64 box to use later in the week to reproduce
award999 commentedon Nov 18, 2025
@compnerd, @matthewbastien has been able to reproduce on an x86_64 windows box
6 remaining items
award999 commentedon Nov 18, 2025
This is probably 2 separate issues then, @matthewbastien is only seeing with LLDB, I was seeing
swift --versioncrashcompnerd commentedon Nov 18, 2025
Yeah, if it is a python version mismatch on LLDB, we should split this into two separate issues. We need a proper reproduction for the swift driver, but that is suspected to be the emulation layer/hardware compatibility.
matthewbastien commentedon Nov 18, 2025
I had Python 3.9.x installed from a loooong time ago. So, I uninstalled that and installed Python 3.10.11 via Python Install Manager, but encountered the same issue. Here's what my path looks like:
charles-zablit commentedon Nov 18, 2025
Given https://github.com/swiftlang/llvm-project/blob/e28b865d5dd84754c6c2a678a54480f96ce07550/lldb/tools/driver/Driver.cpp#L433-L472, not all the changes made it in time.
I will keep an eye on swiftlang/llvm-project#11777 to make sure we get it in time for 6.2.2.
compnerd commentedon Nov 18, 2025
@matthewbastien seems that your Path does not contain Python. Can you restart your terminal emulator and see if it shows up? If so, I believe that LLDB should startup then. If it does, we should split up this issue into two separate threads.
charles-zablit commentedon Nov 19, 2025
I see
C:\Users\mbastien\AppData\Local\Python\binin the screenshot.@matthewbastien can you please run
gcm python310.dllfrom your Powershell shell? If that returns nothing,python310.dllis not available. Otherwise, the issue is somewhere else.charles-zablit commentedon Nov 19, 2025
@matthewbastien swiftlang/llvm-project#11779 is caused by the Python version mismatch and has the exact same stack trace.
matthewbastien commentedon Nov 19, 2025
Yeah, looks like powershell can't find the dll (and most likely LLDB as well):

python310.dlldoes exist in~/AppData/Local/Python/pythoncore-3.10-64, but that isn't in Path. Only the bin folder that's used by Python Install Manager is there. Do we support Python installations from Python Install Manager, or should I just install Python 3.10 directly?Also, the CI for the VS Code Swift extension is failing on Windows with Swift 6.2.1 because of this. In that instance we're using the 6.2.1 image from the swiftlang github actions repo. Does that image need updating to install Python 3.10.x?
charles-zablit commentedon Nov 19, 2025
We only support a Python installation which is in the PATH. If Python Install Manager does not put
python310.dllin the PATH, it's not supported. The only exception to that will be when swiftlang/swift-installer-scripts#447 is merged. It allows us to distribute a minimal Python install with the toolchain on Windows to avoid this unresolvedpython310.dllerror.Is the bot using the docker image from
swift-dockerto run? If so, that should be updated already with swiftlang/swift-docker@316ca5e.award999 commentedon Nov 19, 2025
No we cannot use the swift-docker images, we run directly in the GitHub action agent, and I've checked and the Python version is the same as it's been for a while in that image. I don't want to lose sight that this started failing in our CI job where nothing in the setup is changed, but something about 6.2.1 is different and lldb-dap tests are failing.
We should probably raise a separate issue for the LLDB issue as we got 2 topics here.
regarding the original issue about the access violation
Is that the official decision that x86_64 toolchain on ARM64 will no longer be a supported setup? For the longest time there were issues with the ARM64 toolchain that meant debugging (and maybe LSP) did not work in VS Code so we'll have to make sure the ARM64 toolchain is in fact working if x86_64 on ARM64 support is being dropped.
compnerd commentedon Nov 20, 2025
If this is due to PRISM, then yes. PRISM doesn't support each feature of X86, and I don't think that we should be forced to pessimise the compiler for ARM64 compatibility. We have the native ARM64 toolchain so there is a good solution for the developers working on ARM64.
compnerd commentedon Feb 28, 2026
Hmm, I wonder what the difference is in the build. Can you grab the detailed build log for vcpkg @liamgmgit? Perhaps we can identify what the difference is and apply that.
compnerd commentedon Feb 28, 2026
I don't see the actual CMake invocation, which makes this difficult. It seems that there were a bunch of MinGW dependencies that were pulled in which makes this trickier. Also, I think that we are only interested in the release mode builds (or MinSizeRel).
compnerd commentedon Mar 2, 2026
@liamgmgit I don't understand the last message.
It is likely that they are building mimalloc with a different set of flags, and I would like to understand what that set of flags are. We are not going to be able to change the way that we build - that is codified in https://github.com/swiftlang/swift/blob/main/utils/build.ps1#L2367-L2413. We can however adjust the configuration options based upon what we can learn from the build of mimalloc that vcpkg does. I'd also be willing to switch to using CMake instead of MSBuild if we can get that to properly cross-compile (X64 -> {X64,ARM64}, ARM64 -> {ARM64,X64}).
CC: @hjyamauchi
al45tair commentedon Nov 10, 2026
See also #93987, which is a similar issue, fixed in swiftlang/swift-docker#611.