Skip to content

[5.1][CodeCompletion] Add defensive nullptr check #26154

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

rintaro
Copy link
Member

@rintaro rintaro commented Jul 15, 2019

Cherry-pick of #25876 reviewed by @benlangmuir

  • Explanation: We've seen several crash logs for null pointer dereferencing in code-completion logic. Although we haven't found reproducer for this, add defensive nullptr check to prevent crash.
  • Scope: Context-type analysis in code-completion
  • Issue: rdar://problem/51599533
  • Risk: Low. This patch just turns a crash to "No Completion"
  • Test: Passed current test cases. No regression test added because we haven't been able to find reproducer
  • Reviewer: Ben Langmuir (@benlangmuir)

Prevent crash.
rdar://problem/51599533

(cherry picked from commit 8c8b89c)
@rintaro
Copy link
Member Author

rintaro commented Jul 15, 2019

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented Jul 16, 2019

@swift-ci Please nominate

@rintaro rintaro merged commit 9c927a6 into swiftlang:swift-5.1-branch Jul 16, 2019
@rintaro rintaro deleted the 5.1-ide-completion-checkhasinterfacety-rdar51599533 branch July 16, 2019 16:52
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