Description
Description
There is seemingly random runtime memory corruption happening in our iOS application when it's build with Swift 5.8 (Xcode 14.3). The corruption happens when the application is compiled with optimisations (-O
) enabled and no longer occurs when optimisations are disabled (-Onone
). I have not tested if similar corruption can be reproduced with -Osize
.
There seems to be regression between Swift 5.7.2 (Xcode 14.2) and Swift 5.8 (Xcode 14.3) as the memory corruption started happening straight after updating.
Steps to reproduce
Unfortunately I am unable to provide steps to reproduce as the project where this issue manifests is quite large and complex, so I'm not able to isolate a repro case for it at this time.
Expected behavior
Runtime memory corruption should not happen when optimisations are enabled.
Environment
- swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100) Target: arm64-apple-macosx13.0
- Xcode 14.3 Build version 14E222b
- iOS 14.0