Skip to content

[5.2] [CSSimplify] Guard against null locator #29889

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
Feb 17, 2020
Merged

[5.2] [CSSimplify] Guard against null locator #29889

merged 1 commit into from
Feb 17, 2020

Conversation

theblixguy
Copy link
Collaborator

  • Explanation: resolveValueMember calls CS.performMemberLookup with null locator, which is later passed to isSelfRecursiveKeyPathDynamicMemberLookup. This leads to a crash while indexing. Make sure the locator is not null before accessing it.

  • Issue: SR-12174 | rdar://problem/59496015

  • Scope: Affects use of @dynamicMemberLookup with default implementations.

  • Risk: Very Low. This is a regression from Swift 5.1 which is now fixed.

  • Testing: Added compiler regression test.

  • Reviewed by: @xedin

Cherry-pick of #29886

@theblixguy theblixguy requested a review from xedin February 17, 2020 19:51
@theblixguy theblixguy requested a review from a team as a code owner February 17, 2020 19:51
@xedin
Copy link
Contributor

xedin commented Feb 17, 2020

@swift-ci please test

@theblixguy theblixguy merged commit 606d55b into swiftlang:swift-5.2-branch Feb 17, 2020
@theblixguy theblixguy deleted the fix/SR-12174_5.2 branch February 17, 2020 22:53
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