Skip to content

[5.0] [index] Fix infinite loop while looking at superclasses #23680

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
Apr 1, 2019

Conversation

benlangmuir
Copy link
Contributor

Cherry-pick #23674 to 5.0


  • Explanation: Fixes an infinite loop when indexing an invalid class with circular inheritance.
  • Scope: Affects indexing (including indexing while building) of classes.
  • SR Issue: SR-10236
  • Radar: rdar://49434989
  • Risk: Low; avoids infinite loop by keeping track of already seen classes.
  • Testing: Regression test cases added.
  • Reviewer: @akyrtzi

While checking for superclasses in isUnitTest, we need to handle
circular inheritance. For good measure, add tests for protocols as well.

The new API is designed to behave the same as walkInheritedProtocols
except that is walks over superclasses.

https://bugs.swift.org/browse/SR-10236
rdar://49434989

While checking for superclasses in isUnitTest, we need to handle
circular inheritance. For good measure, add tests for protocols as well.

The new API is designed to behave the same as walkInheritedProtocols
except that is walks over superclasses.

rdar://49434989
@benlangmuir benlangmuir requested a review from a team as a code owner March 30, 2019 01:07
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 2ea6c05

@benlangmuir
Copy link
Contributor Author

@swift-ci please test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 2ea6c05

@tkremenek
Copy link
Member

@swift-ci clean test linux

@akyrtzi akyrtzi merged commit 1b0d7e8 into swiftlang:swift-5.0-branch Apr 1, 2019
@benlangmuir benlangmuir deleted the 50-superclasses branch April 1, 2019 17:01
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