[SR-10488] Pattern matching tuple in Xcode 10.2 results in EXC_BAD_INSTRUCTION #52888
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
run-time crash
Bug → crash: Swift code crashed during execution
swift 5.0
Environment
Xcode 10.2, macOS Mojave 10.14.4
Additional Detail from JIRA
md5: 31c65f6d6335f8d067fc60118d611436
Issue Description:
Reproduce rate is 100%.
Running this function will result in EXC_BAD_INSTRUCTION. Enabled zombies print following:
-[CFURL release]: message sent to deallocated instance 0x6000014e3330
The problem arises, when we have a case in enum with 2 or more associated values and one of them is URL or URLRequest (could not reproduce with other types). Also, we must have at least two same cases in switch which will be executed (changing `where false` to `where true` will not result in crash), and we have to refer to associated values as a tuple `let .connectivity(value)`, not separate values `let .connectivity(url, void)`.
Running this func in Xcode 10.1 results in no crash.
The text was updated successfully, but these errors were encountered: