Skip to content

[4.0] [AST Verifier] Don't verify parsed function bodies in a type-checked AST. #10389

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

Conversation

DougGregor
Copy link
Member

Explanation: Eliminates an AST verifier crash on reasonable ASTs where we ended up
synthesizing the body for a function (e.g., from the Clang importer) that we don't actually need to type-check.
Scope: This is a fairly common source of AST verifier crashes in builds with assertions enabled, but otherwise has zero effect.
Radar: rdar://problem/32774779
Risk: Zero risk to customer builds; this code is disabled in non-assertions compilers.
Testing: Built the affected project with assertions enabled, plus of course normal compiler regression testing.

…AST.

Eliminates an AST verifier crash on reasonable ASTs where we ended up
synthesizing the body for a function (e.g., from the Clang importer)
that we don't actually need to type-check. Fixes
rdar://problem/32774779.

(cherry picked from commit d40e869)
@DougGregor DougGregor added this to the Swift 4.0 milestone Jun 19, 2017
@DougGregor
Copy link
Member Author

@swift-ci please test

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Something to possibly improve in the future, but should be no problem now, and may help with +Asserts builds.

Copy link
Contributor

@rudkx rudkx left a comment

Choose a reason for hiding this comment

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

LGTM. I didn't even realize we had a body kind on AFD.

@ematejska ematejska merged commit b34218b into swiftlang:swift-4.0-branch Jun 21, 2017
@DougGregor DougGregor deleted the ast-verifier-parsed-4.0 branch June 21, 2017 04:37
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.

4 participants