Skip to content

[6.0] MoveOnlyAddressChecker: Turn assertion into early exit. #74376

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 Jun 13, 2024

Explanation: Fixes a crash-on-invalid when an inout parameter is consumed but is only initialized on some but not all subsequent conditional paths that appear in a certain order.
Scope: Bug fix.
Issue: rdar://123604613
Original PR: #74374
Risk: Low. Removes an assertion and replaces it with control flow skipping the case.
Testing: Swift CI, test case from bug report
Reviewer: @gottesmm

This condition can occur in practice if, while doing the walk back to find the liveness
reason for a consume-without-reinitialization of an `inout` binding through conditional
control flow, we visit a block that reinitializes the binding before any branch that
leaves the binding uninitialized. Fixes rdar://123604613.
@jckarter jckarter requested a review from a team as a code owner June 13, 2024 04:21
@jckarter jckarter changed the title MoveOnlyAddressChecker: Turn assertion into early exit. [6.0] MoveOnlyAddressChecker: Turn assertion into early exit. Jun 13, 2024
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter merged commit 858bea9 into swiftlang:release/6.0 Jun 13, 2024
5 checks passed
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.

3 participants