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

Open
belkadan opened this issue Jul 12, 2018 · 2 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself runtime The Swift Runtime

Comments

@belkadan
Copy link
Contributor

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.

@belkadan
Copy link
Contributor Author

cc @mikeash

@mikeash
Copy link
Contributor

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
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself runtime The Swift Runtime
Projects
None yet
Development

No branches or pull requests

2 participants