Open swift-ci opened 7 years ago
Comment by Mikko Välimäki (JIRA)
Looks like the issue could be even reduced a bit. The issue might be related to something mentioned here: https://github.com/lionheart/openradar-mirror/issues/12033
@jckarter, we've seen this before, correct?
Seems to be fixed on master, which is good. As a workaround, if it's the issue I'm thinking of I believe it does not occur when you use chained if
instead of switch
.
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, RunTimeCrash | |Assignee | None | |Priority | Medium | md5: 937be89180ecc6337d301e9a32716c54relates to:
Issue Description:
Running the following lines of code will reproduce the issue:
This is reproducible on both, macOS and iOS. From what it looks, the following has to happen here:
The items must be of type BaseProtocol
The protocol NSObjectProtocol (and thus inheritance from NSObject) must be present
The switch case let must be used here
After this, with zombies enabled you get something like this:
[RetainReleaseIssue.SomeClass retain]: message sent to deallocated instance 0x60800000a99
Attached is an example of the issue which is also defined here.