Skip to content

[5.2] IRGen: Work around RemoteMirror bug generating reflection info for empty builtin types. #29043

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Jan 7, 2020

Explanation: The RemoteMirror library in shipping versions of macOS/iOS/tvOS/watchOS crashes if the compiler
emits a BuiltinTypeDescriptor with size zero. Although this is fixed in top-of-tree RemoteMirror,
we want binaries built with the new compiler to still be inspectable when run on older OSes.
Generate the metadata as an empty struct with no fields when deploying back to these older
platforms, which should be functionally equivalent for most purposes.

Issue: Fixes rdar://problem/57924984.

Risk: Low, changes reflection codegen to use an equivalent encoding that doesn't crash older RemoteMirrors

Reviewed by: @slavapestov, @mikeash

Testing: Swift CI, local execution testing

…pty builtin types.

The RemoteMirror library in shipping versions of macOS/iOS/tvOS/watchOS crashes if the compiler
emits a BuiltinTypeDescriptor with size zero. Although this is fixed in top-of-tree RemoteMirror,
we want binaries built with the new compiler to still be inspectable when run on older OSes.
Generate the metadata as an empty struct with no fields when deploying back to these older
platforms, which should be functionally equivalent for most purposes.
Fixes rdar://problem/57924984.
@jckarter jckarter requested a review from a team as a code owner January 7, 2020 19:14
@jckarter
Copy link
Contributor Author

jckarter commented Jan 7, 2020

@swift-ci Please test

@airspeedswift
Copy link
Member

original: #29037

@jckarter jckarter merged commit 03a76c7 into swiftlang:swift-5.2-branch Jan 7, 2020
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