Skip to content

Serialization: Fix crash when deserializing store_unowned SIL instruction #13418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

slavapestov
Copy link
Contributor

Fixes rdar://problem/35980211.

…tion

We were casting the operand type to a WeakStorageType when in fact
it is an UnownedStorageType.

Fixes <rdar://problem/35980211>.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@jrose-apple
Copy link
Contributor

Wow. How did this ever work for plain class references? Thanks for the quick turnaround.

@slavapestov
Copy link
Contributor Author

@jrose-apple It looks like existentials and Objective-C classes use one access pattern involving a store_unowned, and Swift-native classes use another where we do a ref_to_unowned followed by a plain store. @rjmccall would know the details.

@slavapestov slavapestov merged commit 079796e into swiftlang:master Dec 14, 2017
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