Skip to content

Account for whether artificial subclasses are skipped on type caching #68467

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

augusto2112
Copy link
Contributor

MetadataReader caches types only with the metadata address as the key. However a type lookup can be requested skipping artificial subclasses or not. This makes the cached results incorrect if two requests for the same type, but skipping subclasses on one and not on the other, are made. Fix this by adding a second dimension to the cache key.

rdar://101519300
(cherry picked from commit 9151305)

MetadataReader caches types only with the metadata address as the key.
However a type lookup can be requested skipping artificial subclasses or
not. This makes the cached results incorrect if two requests for the
same type, but skipping subclasses on one and not on the other, are made.
Fix this by adding a second dimension to the cache key.

rdar://101519300
(cherry picked from commit 9151305)
@augusto2112 augusto2112 requested a review from a team as a code owner September 12, 2023 21:31
@augusto2112
Copy link
Contributor Author

@swift-ci test

@adrian-prantl adrian-prantl merged commit e019b2a into swiftlang:release/5.9 Sep 13, 2023
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