Skip to content

[4.2] [TypeChecker] Fix crash with Objective C keypaths. #17504

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 2 commits into from
Jun 26, 2018
Merged

[4.2] [TypeChecker] Fix crash with Objective C keypaths. #17504

merged 2 commits into from
Jun 26, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jun 26, 2018

We have a crash reported but do not have a test case and my attempt at
creating one was unsuccessful. It seems like the issue is that we have
an invalid decl that we attempt to access the interface type on,
though, so hopefully this fixes the issue.

I also tweaked the constraint generator to bail out when
checkObjCKeyPathExpr fails.

Potentially fixes: rdar://problem/40955755

(cherry picked from commit e0ce5fc)

rudkx added 2 commits June 25, 2018 23:20
We have a crash reported but do not have a test case and my attempt at
creating one was unsuccessful. It seems like the issue is that we have
an invalid decl that we attempt to access the interface type on,
though, so hopefully this fixes the issue.

I also tweaked the constraint generator to bail out when
checkObjCKeyPathExpr fails.

Potentially fixes: rdar://problem/40955755

(cherry picked from commit e0ce5fc)
And add a test that exercises this exit path (although it won't crash
a compiler without my fixes because we do end up with ErrorType in
that case, not a nullptr).

(cherry picked from commit 846f159)
@rudkx rudkx changed the title Rdar40955755 4.2 [4.2] [TypeChecker] Fix crash with Objective C keypaths. Jun 26, 2018
@rudkx
Copy link
Contributor Author

rudkx commented Jun 26, 2018

@swift-ci Please test

@rudkx rudkx merged commit d66a682 into swiftlang:swift-4.2-branch Jun 26, 2018
@rudkx rudkx deleted the rdar40955755-4.2 branch June 26, 2018 15:35
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.

1 participant