Skip to content

[ownership] Fix a corner case in the linear lifetime checker. #23937

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

gottesmm
Copy link
Contributor

Specifically, if we had a value that was consumed in the same block that it was
produced in, we ignored use-after-frees in subsequent blocks. We did check for
use-after-frees in the same block though. The general case was handled
correctly, this was just an incorrect early exit.

On master, this only found one problem (namely the one fixed in:
14d39c0). I do not expect this corner case to
have more impact after cherry-picking to 5.1.

rdar://49794321

Specifically, if we had a value that was consumed in the same block that it was
produced in, we ignored use-after-frees in subsequent blocks. We did check for
use-after-frees in the same block though. The general case was handled
correctly, this was just an incorrect early exit.

On master, this only found one problem (namely the one fixed in:
14d39c0). I do not expect this corner case to
have more impact after cherry-picking to 5.1.

rdar://49794321
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 3d30997 into swiftlang:master Apr 11, 2019
@gottesmm gottesmm deleted the pr-2f57101aac9e805aaafc898af5c7766c49454c1e branch April 11, 2019 00:10
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