Announcing Swift 6.4.2

Announcing Swift 6.4.2

We are happy to announce the release of Swift 6.4.2.

Install Swift Toolchain

  • Install via Swiftly
    swiftly install 6.4.2 or swiftly install latest
  • Download toolchain directly from Install Swift | Swift.org
  • Docker images will be available on hub.docker.com//swift soon (PR)
  • Swift toolchain will be available on WinGet soon (PR)
  • Xcode 27.2 contains Swift 6.4.2

Release Notes

Compiler and Optimizer

  • Fixed a miscompile in optimized builds affecting statically initialized arrays of imported C structs with trailing padding. (swift#91557)
  • Fixed a miscompile that caused a false exclusivity violation at runtime in some cases involving deinit. (swift#91820)
  • Fixed a debug-build crash in some async functions with large SIMD parameters such as SIMD3<Double>. (llvm-project#14048)
  • Fixed a 6.4 regression with @TaskLocal when it is followed by another attribute. (swift#93063)
  • Fixed a crash when loading precompiled Clang modules with a missing directory. (llvm-project#14045)
  • Fixed a compiler error for distributed var properties when exported symbol validation is enabled. (swift#91640)
  • Fixed an ABI stability issue for protocol conformances of types annotated with @_originallyDefinedIn that are moved into their protocol's module. (swift#92673)

Availability

  • Computed properties with an init accessor and an initial value can no longer be marked unavailable. (swift#91742)
  • Structs with unavailable init accessors no longer get a synthesized memberwise initializer. (swift#91748)
  • Fixed a 6.4 regression in availability checking for code unavailable in app extensions. (swift#91750)
  • @_originallyDefinedIn is now always printed in swiftinterfaces. (swift#92065)
  • Fixed a name collision involving availability domain macros. (llvm-project#13986)
  • Fixed an issue where -define-availability could treat equal versions as different. (llvm-project#13291)

Standard Library

  • Fixed Array and ContiguousArray init(unsafeUninitializedCapacity:initializingWith:) so that an invalid initializedCount now traps instead of causing undefined behavior. (swift#91690)

Debugger

  • LLDB expressions no longer fail when a variable that is not used by the expression is not available. (llvm-project#13990)
  • Fixed a debugger crash on type names that can't be demangled. (llvm-project#14060)
  • Fixed an LLDB hang when a REPL expression hits a breakpoint. (llvm-project#14452)
  • Fixed an out-of-bounds write when parsing MultiMemRead responses; invalid responses now produce an error. (llvm-project#14374)
  • Fixed LLDB reading unmapped memory when loading libraries from the dyld shared cache. (llvm-project#14297)
  • Fixed incorrect Wasm data segment names in LLDB when name entries are out of order. (llvm-project#14389)
  • Fixed stepping through "lazy library" stubs in binaries built for macOS 27 and later. (llvm-project#14491)

Swift Package Manager

Swift Build

  • Fixed a build error ("no library for this platform was found") when using multi-architecture XCFrameworks on Linux, and a case where the wrong architecture's slice could be chosen. (swift-build#1587)
  • Fixed framework builds re-running InstallAPI unnecessarily during incremental builds. (swift-build#1681, swift-build#1722, swift-build#1742)
  • Deduplicated -add_ast_path linker arguments, which could exceed the command-line length limit when linking many Swift libraries. (swift-build#1683)
  • Fixed an issue where a dynamic package product could be incorrectly diagnosed as a missing dependency. (swift-build#1808)
  • Improved build failure handling by skipping an unnecessary sandbox log scan for tasks that fail during setup. (swift-build#1691)
  • Fixed a hang in Swift Build on Windows and Linux when a process failed to launch. (swift-build#1830)
  • Testing frameworks are no longer embedded into build products when building for the appropriate deployment target. (swift-build#1718)
  • Fixed codesign failures when building inside a cloud-synced directory on macOS 14 and later. (swift-build#1731)

Foundation

Swift Testing

  • Fixed incorrect event descriptions in Swift Testing's JSON output when a test runs multiple iterations. (swift-testing#1935)

Regex

Corelibs libdispatch

20 Likes