Skip to content

Conversation

@aschwaighofer
Copy link
Contributor

Description: Whenever we would link against a swift overlay (like CallKit) that has weakly linked Objective-C classes we run the risk of crashing in runtime functions that access type metadata.
The type metadata is initiatialized with swift_getObjCClassMetadata. If the class is weakly linked and not present this function is called with a null (the weakly linked) class.
For example, we crash on iOS9 on a simple “print(“foo”)” call when this application links against CallKit.

Scope: At least three bug reports so far.

Risk: Very low, the fix is to return null if the class passed is null.

Tested: Verified that the reported crashers work after this change

Radar: rdar://problem/28203571 (also rdar://problem/28340074)

Reviewed by: Joe Groff

rdar://28203571

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test os x platform

@aschwaighofer aschwaighofer added this to the Swift 3.0 milestone Sep 28, 2016
@tkremenek tkremenek merged commit 9c73778 into swiftlang:swift-3.0-branch Sep 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants