Skip to content

[4.2] Exclusivity: Disable verifier assert on noescape closure block args. #18014

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
Jul 18, 2018
Merged

[4.2] Exclusivity: Disable verifier assert on noescape closure block args. #18014

merged 1 commit into from
Jul 18, 2018

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jul 17, 2018

This is a small hole in the exclusivity model that verification is now catching
in 4.2. On 4.2, disable the verification just in this narrow, unsupported
case. This silences a harmless assert and reverts to the 4.1 behavior in this
unusual corner case. The exclusivity enforcement hole will be fully fixed on
master.

Fixed rdar://problem/42242406 [SR-8266]: Compiler crash when checking exclusivity of inout alias.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test source compatibility.

@atrick atrick requested a review from shajrawi July 17, 2018 21:02
Copy link

@shajrawi shajrawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@atrick atrick changed the title Exclusivity: Disable verifier assert on noescape closure block args. [4.2] Exclusivity: Disable verifier assert on noescape closure block args. Jul 17, 2018
This is a small hole in the exclusivity model that verification is now catching
in 4.2. On 4.2, disable the verification just in this narrow, unsupported
case. This silences a harmless assert and reverts to the 4.2 behavior in this
unusual corner case. The exclusivity enforcement hole will be fully fixed on
master.

Fixed <rdar://problem/42242406> [SR-8266]: Compiler crash when checking
exclusivity of inout alias.
@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test source compatibility.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci test source compatibility.

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

Explanation: 4.2 verifies the exclusivity model for completeness. This caught another corner case that has always been a small hole in the model. Disable verification in this narrow case to revert to Swift 4.1 behavior. The model will be fixed on master.

Scope: Avoids a Debug assert. Does not affect Release builds.

Radar/SR Issue: rdar://problem/42242406 [SR-8266]: Compiler crash when checking exclusivity of inout alias.

Risk: This is a straightforward bypass of the assert. There is no new risk.

Testing: New unit tests and existing compatibility tests were run.

Reviewer: Joe Shajrawi

@atrick
Copy link
Contributor Author

atrick commented Jul 17, 2018

@swift-ci nominate.

@atrick
Copy link
Contributor Author

atrick commented Jul 18, 2018

There are a lot of unexpected passing tests in the SCK, but no actual failures.

@atrick atrick merged commit e325e32 into swiftlang:swift-4.2-branch Jul 18, 2018
@atrick atrick deleted the 4.2-exclusivity-pa-use-assert branch July 18, 2018 01:58
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