Skip to content

[6.2] Relative witness table fixes #80845

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

DougGregor
Copy link
Member

@DougGregor DougGregor commented Apr 16, 2025

…onsFromExecutorWitnessTable

Part of rdar://148687148.
…ormance cache

With relative witness tables, the low bit of a witness table pointer is
an indicator that we need to load from the given pointer. We were also
using the low bit of the witness table pointer in the conformance
cache entry as part of a pointer union. Hilarity ensures [*].

Switch to another low bit by exploding the conformance cache key
into separate fields and taking the low bit of one of those pointers
that isn't reserved.

Fixes the remainder of rdar://149326058, I hope.

[*] No, I am not laughing.
@DougGregor DougGregor requested a review from a team as a code owner April 16, 2025 01:19
@DougGregor
Copy link
Member Author

@swift-ci please test

This can happen when running against an older version of a library that
doesn't have the protocol defined.
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 15ecd66 into swiftlang:release/6.2 Apr 17, 2025
5 checks passed
@DougGregor DougGregor deleted the relative-witness-tables-fixes-6.2 branch April 17, 2025 00:37
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