Swift 5.5 has serious stack corruption bugs!

Let's be careful here- we know this particular bug escaped into the wilds - and we know that async await is new, and that means there aren't alot of codebases available to test it. Lets get these fixes into Xcode betas and iterate. Given the scope of this work, and the speed with which it caused problems in the wild, there are probably more bugs hiding behind this one.

And all of us who can in the community, try it out and test.

It's a compiler-only change with no impact on any OS.



hi, i just tested with the Oct 5 nightly snapshot, which is the first since that PR was merged, and the issues are still present. the commit hashes are

$ swiftc --version
Swift version 5.6-dev (LLVM 7aef0efea99e2c6, Swift e4f71c8e118fc09)
Target: x86_64-unknown-linux-gnu

i’m not sure if the LLVM hash 7aef0efea99e2c6 is before or after the fix was merged

This snapshot did not have the fix.



okay! thanks for clarifying!

Tested on M1 with Xcode 13/ iOS 15 with below Swift 5.5 version seems doesn't hit the 1st issue
swift-driver version: 1.26.9 Apple Swift version 5.5 (swiftlang-1300.0.31.1 clang-1300.0.29.1)
Target: arm64-apple-macosx11.0

hi, i’ve successfully built an updated toolchain against llvm stable/20210726, and i can confirm that 3 out of 4 of the bugs listed in the beginning of this thread are no longer present.

i’ve gone ahead and closed those three issues on the bug tracker.

it appears that SR-15266, the SIMD segfault, is still present, even with the LLVM fix. (@timdecode)

i do not know if the bugs discovered by @mickeyl are still present.


Good news! Do you perhaps have webspace to upload the toolchain somewhere? I'd like to verify my issues.

1 Like

what platform are you on? i only have binaries for Ubuntu 20.04

I'd appreciate Ubuntu 20.04 binaries... any chance you can push a docker image to docker hub? (May not be a huge deal... I assume swiftlang/swift:nightly-focal-main won't be stuck at 10-5 forever...)

1 Like

i don’t know how to create a docker image, but here is zip file with the 20.04 toolchain i am using:


Xcode 13.1 RC have the fixes you mentioned above?




cool, will test.

Any idea which linux build we can test with as well?

I can confirm the SIMD bug is still there (expectedly) in Xcode 13.1 RC. Thanks for checking it out on llvm stable.


I assume Xcode 13.1 has a recent snapshot from the 5.5 branch: there have been regular 5.5 snapshot builds available for linux, most recently a couple days ago.

1 Like

I just checked the new release version of Xcode 13.1 (13A1030d) and it still has the SIMD bug.

It's unrelated to the other bugs, and was recently fixed here.



This is very exciting for me. Thank you!