Skip to content

[5.1] [index] Fix infinite loop while looking at superclasses #23681

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

benlangmuir
Copy link
Contributor

Cherry-pick #23674 to 5.1


  • 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
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6e17f1a

@benlangmuir
Copy link
Contributor Author

@swift-ci please clean test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 6e17f1a

@benlangmuir
Copy link
Contributor Author

@swift-ci please test Linux

@benlangmuir benlangmuir merged commit c6893fa into swiftlang:swift-5.1-branch Apr 1, 2019
@benlangmuir benlangmuir deleted the 51-superclasses branch April 1, 2019 20:00
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.

2 participants