Skip to content

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

Merged
jckarter merged 1 commit into
swiftlang:swift-5.2-branchfrom
jckarter:zero-builtin-type-descriptor-workaround-5.2
Jan 7, 2020
Merged

[5.2] IRGen: Work around RemoteMirror bug generating reflection info for empty builtin types.#29043
jckarter merged 1 commit into
swiftlang:swift-5.2-branchfrom
jckarter:zero-builtin-type-descriptor-workaround-5.2

Conversation

@jckarter
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

jckarter commented Jan 7, 2020

@swift-ci Please test

@airspeedswift
Copy link
Copy Markdown
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