[metadata prespecialization] Ptrauth for compared protocol conformances. #32791
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Two protocol conformance descriptors are passed to
swift_compareProtocolConformanceDecriptors
from generic metadataaccessors when there is a canonical prespecialization and one of the generic arguments has a protocol requirement.
Previously, the descriptors were incorrectly being passed without ptrauth processing: one from the witness table in the arguments that are passed in to the accessor and one known statically.
Here, the descriptor in the witness table is authed using the
ProtocolConformanceDescriptor
schema. Then, both descriptors are signed using theProtocolConformanceDescriptorsAsArguments
schema. Finally, in the runtime function, the descriptors are authed.