Skip to content

[5.6] LoadableByAddress: Fix code that changes lowered return type of function. #40930

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

Explanation: Functions using opaque return types, with large value types as arguments or returns, could end up causing invalid SIL to be generated, leading to compiler crashes.

Scope: Bug fix

Issue: rdar://87792152

Risk: Low. One-line fix for a specific edge case that was mishandled.

Testing: Swift CI, project from original issue

Reviewed by: @slavapestov

…ion.

It confused the original type's substituted generic signature for the new
type's invocation generic signature, leading to corrupted SIL when a
function had a substituted SIL function type with a return type involving
large loadable types that have to be passed indirectly in IR.

Fixes rdar://87792152
@jckarter jckarter requested a review from a team as a code owner January 20, 2022 18:19
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please nominate

@jckarter jckarter merged commit c8565c8 into swiftlang:release/5.6 Jan 25, 2022
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