[SR-3666] Swift 3 compiler with optimization crashes or produces crashing binary. #46251
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
regression
swift 3.0
Attachment: Download
Environment
Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 6da5c3680c3f1a23f623e8712ce8d495
Issue Description:
In debug this code compiles and runs fine. However, with Swift Compiler Optimization turned on (`-O` with or without whole module optimization), a crashing binary is produced. The binary only outputs "one" and then crashes with a bad access exception.
Additionally, if you leave an empty body for the `init()` method, the compiler crashes.
Attached you'll find an example project to reproduce the issue and the crash log from the compiler.
This bug was found upon compiling a Release version of an App of ours after migrating to Swift 3. This bug was not present in the Swift 2 compiled version.
The text was updated successfully, but these errors were encountered: