Skip to content

Conversation

@slavapestov
Copy link
Contributor

My earlier changes in #22498 had a bug; I neglected to handle 'obfuscated' tagged pointers.

I need this to reproduce a test failure.
If resolving the type of an instance produces a class metadata for
which we cannot build a type (for example, a special class like
__NSCFNumber, which the ClangImporter does not produce a ClassDecl
for), we try the superclass.

The caching logic was broken in this case, so subsequent calls
would return an empty type.
Turns out the tags are shuffled around by XORing with a
per-process hash, and we have to deobfuscate the tag
before checking if its an extended tag.

There's no test for this; just running the existing tests
several times in a row is sufficient to trigger the problem.
@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov
Copy link
Contributor Author

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 3d3dafb into swiftlang:master Feb 12, 2019
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