Skip to content

Don't emit marker protocols into runtime type metadata. #39812

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Oct 19, 2021

Description: Marker protocols like Sendable don't exist at runtime, but the compiler is mangling them into the strings that appear in runtime metadata, leading to miscompiles and broken mirror and tool support when there are properties and generics with type Sendable. Drop marker protocols when mangling a type for the purposes of runtime type metadata or reflection.
Risk: Low
**Reviewed by: ** Joe Groff
Testing: PR testing, CI, new tests
Original PR: #39782
Radar: rdar://82314404

Marker protocols don't exist at runtime, drop them when mangling a type
for the purposes of runtime type metadata or reflection. Fixes
rdar://82314404.

(cherry picked from commit 7d7ec9e)
@DougGregor DougGregor requested a review from a team as a code owner October 19, 2021 15:47
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 59158a1

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 59158a1

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 6a355ae into swiftlang:release/5.5 Oct 22, 2021
@DougGregor DougGregor deleted the marker-protocol-runtime-type-metadata-5.5 branch October 22, 2021 19:13
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants