Skip to content

6.2: [MoveOnlyChecker] Don't complete phis. #81574

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

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented May 16, 2025

Explanation: Fix a compiler crash caused by completing certain lifetimes during move checking.

Apply the fix from #73359 to the move-only object checker.

Move-only checking relies on the completeness of lifetimes of interest. But lifetime completion doesn't handle phis. So bail out of attempts to complete their lifetimes.

This will become irrelevant when lifetimes are complete throughout OSSA.
Scope: Affects move-only code.
Issue: rdar://151325025
Original PR: #81566
Risk: Low, an analogous change was applied to the address checker in release/6.0.
Testing: Added test.
Reviewer: Andrew Trick ( @atrick )

Apply the MoveOnlyAddressChecker change from
swiftlang#73358 to the
MoveOnly[Value]Checker.

After 7713eef, before running value
checking, all lifetimes in the function are completed.  That doesn't
quite work because lifetime completion expects not to encounter
reborrows or their adjacent phis.

rdar://151325025
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review May 19, 2025 14:38
@nate-chandler nate-chandler requested a review from a team as a code owner May 19, 2025 14:38
@nate-chandler nate-chandler enabled auto-merge May 19, 2025 14:38
@nate-chandler nate-chandler merged commit 8e0a389 into swiftlang:release/6.2 May 19, 2025
5 checks passed
@nate-chandler nate-chandler deleted the cherrypick/release/6.2/rdar151325025 branch May 19, 2025 15:20
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