[SR-8100] Compiled code crashes with a EXC_BAD_INSTRUCTION #50633
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
non-optimized only
Flag: An issue whose reproduction requires non-optimized compilation
run-time crash
Bug → crash: Swift code crashed during execution
Environment
Xcode 10.0 beta 2 (10L177m), with default toolchain.
Additional Detail from JIRA
md5: 767f1f602acd3cd56a440f48615f9244
duplicates:
Issue Description:
The following code crashes when run (in debug mode):
import Foundation
enum LibXML2Node {
{{ case other(value: Data?, children: [LibXML2Node])}}
{{}}}
let a = [LibXML2Node]()
Making the enum indirect or replacing Data by a String or removing the first argument of the enum case fixes the crash.
The compiled program does not crash when compiled with optimisations (whole module, -O).
The text was updated successfully, but these errors were encountered: