Skip to content

IRGen: fix how metadata is loaded for fast class casting #61219

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
merged 1 commit into from
Sep 22, 2022

Conversation

eeckstein
Copy link
Contributor

Pass the correct type to emitHeapMetadataRefForHeapObject(). Fixes a runtime crash in case a class protocol is cast to a final swift class, where the actual object is an ObjectiveC class instance.

rdar://99626888

@eeckstein
Copy link
Contributor Author

@swift-ci test

1 similar comment
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein force-pushed the fix-fast-class-casting branch from f4a8350 to 9b38178 Compare September 22, 2022 06:27
@eeckstein
Copy link
Contributor Author

@swift-ci test

Pass the correct type to `emitHeapMetadataRefForHeapObject()`.
Fixes a runtime crash in case a class protocol is cast to a final swift class, where the actual object is an ObjectiveC class instance.

rdar://99626888
@eeckstein eeckstein force-pushed the fix-fast-class-casting branch from 9b38178 to 2527d37 Compare September 22, 2022 06:46
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 07cd329 into swiftlang:main Sep 22, 2022
@eeckstein eeckstein deleted the fix-fast-class-casting branch September 22, 2022 11:31
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.

1 participant