Skip to content

Commit 79dd09c

Browse files
committed
[Runtime] Auth args to compareTypeContextDescriptors.
When swift_compareTypeContextDescriptors was added, it did not auth the TypeContextDesriptor arguments that were passed to it. Fix that here. There are not any uses of this function yet, so there are no signs that need to be added.
1 parent 08612ff commit 79dd09c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

stdlib/public/runtime/Metadata.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,11 @@ bool swift::equalContexts(const ContextDescriptor *a,
20632063
SWIFT_CC(swift)
20642064
bool swift::swift_compareTypeContextDescriptors(
20652065
const TypeContextDescriptor *a, const TypeContextDescriptor *b) {
2066+
a = swift_auth_data_non_address(
2067+
a, SpecialPointerAuthDiscriminators::TypeDescriptor);
2068+
b = swift_auth_data_non_address(
2069+
b, SpecialPointerAuthDiscriminators::TypeDescriptor);
2070+
20662071
// The implementation is the same as the implementation of
20672072
// swift::equalContexts except that the handling of non-type
20682073
// context descriptors and casts to TypeContextDescriptor are removed.

0 commit comments

Comments
 (0)