Swift 6.4.1 is now available, with fixes for incorrect optimized code, release-build failures and dependency resolution problems. The Swift project announced the update on October 13. For developers already using the 6.4 toolchain, the most consequential changes concern whether a build produces the right result or finishes at all. [1]
When optimization changes the result
One compiler fix addresses writes through MutableSpan or another pointer to a local variable. When that pointer was passed inout to a function, the optimizer could overlook the write and reuse an earlier value. The example in the fix shows an array element incorrectly retaining its original value after a function updates it through a span. [2]
That is a correctness problem in the affected code pattern. A successful build alone would not establish that the resulting program behaves correctly. Teams using these patterns should include optimized builds in their regression tests when evaluating the patch.
Two other compiler changes address build failures: a verification error involving multiple weak-self closures with -Osize and cross-module optimization, and a release-mode failure caused by the loop optimizer moving assignment instructions incorrectly. [1, 3]
Package resolution and cross-platform fixes
Swift Package Manager fixes an infinite loop in its PubGrub dependency resolver and a separate failure involving default package traits. An undeclared PrivacyInfo.xcprivacy file is now ignored for non-Apple targets, avoiding an unwanted Foundation dependency. [1, 4, 7]
The release also repairs a Linux backtracer crash associated with installed libc symbols. Swift Testing changes prevent warnings and known issues from being counted as failures when deciding whether to repeat tests. These are targeted reliability fixes; their relevance depends on the project's platform and build configuration. [1, 8]
Check the toolchain you actually use
Swift.org lists 6.4.1 toolchains for macOS, Linux and Windows. Developers using Swiftly can install the specific release with swiftly install 6.4.1. [1, 5]
For Apple-platform development, check the compiler bundled with the Xcode version your project uses. Apple's compatibility page identifies Swift 6.4 for Xcode 27, but does not establish that this separately announced patch is included. Installing a Swift.org toolchain and updating Xcode are distinct steps. [5, 6]
Sources
[1] Swift Forums: Announcing Swift 6.4.1, October 13, 2026
[2] Swift compiler fix: Alias analysis and writes through pointers, PR 92631
[3] Swift compiler fix: LoopInvariantCodeMotion assignment handling, PR 92506
[4] Swift Package Manager: PubGrub infinite-loop fix, PR 10487
[5] Swift.org installation pages: macOS, Linux, Windows
[6] Apple Developer: Xcode SDKs and system requirements
[7] Swift Package Manager: Ignore undeclared privacy manifests for non-Apple targets, PR 10580
[8] Swift Testing: Test-repetition handling for non-failure issues, PR 1924
Swift and the Swift logo are trademarks of Apple Inc. Cover logo: Apple Developer.
