Skip to content

Commit ee5290a

Browse files
authored
Merge pull request #80600 from mikeash/check-witness-table-isolation-ptrauth
[Runtime] Handle relative witness tables in _checkWitnessTableIsolation.
2 parents 4290f0a + f01d46c commit ee5290a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

stdlib/public/runtime/ProtocolConformance.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,15 @@ static bool _checkWitnessTableIsolation(
444444
llvm::ArrayRef<const void *> conditionalArgs,
445445
ConformanceExecutionContext &context
446446
) {
447-
// If there's no protocol conformance descriptor, do nothing.
447+
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES && SWIFT_PTRAUTH
448+
auto description = lookThroughOptionalConditionalWitnessTable(
449+
reinterpret_cast<const RelativeWitnessTable *>(wtable))
450+
->getDescription();
451+
#else
448452
auto description = wtable->getDescription();
453+
#endif
454+
455+
// If there's no protocol conformance descriptor, do nothing.
449456
if (!description)
450457
return false;
451458

0 commit comments

Comments
 (0)