You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apple Swift version 4.0 (swiftlang-900.0.45.6 clang-900.0.26)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug
Assignee
None
Priority
Medium
md5: 8a506766f8df6e0b35b19a5ee68add55
duplicates:
SR-5310 unowned object crashes in noescape closures
Issue Description:
When compiling a project with Swift 3.2 we found a memory issue due to an (unnecessary) "unowned" keyword in a non-escaping block. I was able to create a minimal example which crashes with an EXC_BAD_ACCESS signal, both when compiled with Swift 3.2 and 4.0:
The crash disappears, when A doesn't inherit from NSObject. I'm not 100% sure if this is a compiler issue or a programmer error but in my understanding adding [unowned self] shouldn't change anything in a non-escaping block.
When compiling the same code with Swift 3.1, it doesn't crash, so this is at least a compatibility issue.
The text was updated successfully, but these errors were encountered:
Environment
Apple Swift version 4.0 (swiftlang-900.0.45.6 clang-900.0.26)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 8a506766f8df6e0b35b19a5ee68add55
duplicates:
Issue Description:
When compiling a project with Swift 3.2 we found a memory issue due to an (unnecessary) "unowned" keyword in a non-escaping block. I was able to create a minimal example which crashes with an EXC_BAD_ACCESS signal, both when compiled with Swift 3.2 and 4.0:
The crash disappears, when A doesn't inherit from NSObject. I'm not 100% sure if this is a compiler issue or a programmer error but in my understanding adding [unowned self] shouldn't change anything in a non-escaping block.
When compiling the same code with Swift 3.1, it doesn't crash, so this is at least a compatibility issue.
The text was updated successfully, but these errors were encountered: