Skip to content
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

[SR-8242] Runtime should be strict about ClassMetadata vs. AnyClassMetadata #50774

belkadan opened this issue Jul 12, 2018 · 2 comments


Copy link

@belkadan belkadan commented Jul 12, 2018

Previous ID SR-8242
Radar None
Original Reporter @belkadan
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Runtime
Assignee None
Priority Medium

md5: 3dc36eb46eda548c07ef625731fe4265

Issue Description:

The runtime technically has a distinction between ClassMetadata, which models the metadata of a pure Swift class, and AnyClassMetadata, which might be a Swift class or an Objective-C class. However, we use ClassMetadata in a lot of places where we really mean AnyClassMetadata. We're pretty good about checking for isTypeMetadata() before using any other members, but Clang is totally within its rights to hoist loads past those checks.

Copy link
Contributor Author

@belkadan belkadan commented Jul 12, 2018

Copy link

@mikeash mikeash commented Jul 13, 2018

I'm getting unpleasant flashbacks to #17879.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants