Skip to content

[5.10] Fix tryRewriteToPartialApplyStack to handle undef #70177

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

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Dec 2, 2023

Fixes rdar://117366370 callback_fn<tryRewriteToPartialApplyStack

(cherry picked from commit 224c379)

--- CCC ---
Explanation: ClosureLifetimeFixup bug. Here, insertDestroyOfCapturedArguments checks isTrivial with an 'undef' which always crashes because 'undef' doesn't have a function.

Scope: This is a regression in 5.10 but appears to only crash with invalid code.

Issue: rdar://117366370 Crash: callback_fn<tryRewriteToPartialApplyStack(swift::ConvertEscapeToNoEscapeInst*

Risk: Zero. Substitutes a condition that would always crash with an equivalent condition that will never crash.

PR to main: #70176

Testing: Added regression test to the test suite.

Reviewer: @meg-gupta

Fixes rdar://117366370 callback_fn<tryRewriteToPartialApplyStack

(cherry picked from commit 224c379)
@atrick atrick requested a review from a team as a code owner December 2, 2023 01:24
@atrick
Copy link
Contributor Author

atrick commented Dec 2, 2023

@swift-ci test

@atrick atrick merged commit 6f0e7ac into swiftlang:release/5.10 Dec 4, 2023
@atrick atrick deleted the 5.10-fix-rewrite-pa-undef branch December 4, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants