Skip to content

Commit d0812a4

Browse files
authored
Merge pull request #80838 from DougGregor/relative-witness-tables-isolation-check
[Runtime] Handle relative witness tables in _getIsolationCheckingOptionsFromExecutorWitnessTable
2 parents ace5c20 + 663ef8a commit d0812a4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

stdlib/public/Concurrency/Actor.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,13 @@ extern "C" SWIFT_CC(swift) void _swift_task_enqueueOnExecutor(
506506
static swift_task_is_current_executor_flag
507507
_getIsolationCheckingOptionsFromExecutorWitnessTable(const SerialExecutorWitnessTable *_wtable) {
508508
const WitnessTable* wtable = reinterpret_cast<const WitnessTable*>(_wtable);
509+
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
510+
auto description = lookThroughOptionalConditionalWitnessTable(
511+
reinterpret_cast<const RelativeWitnessTable*>(wtable))
512+
->getDescription();
513+
#else
509514
auto description = wtable->getDescription();
515+
#endif
510516
if (!description) {
511517
return swift_task_is_current_executor_flag::None;
512518
}

stdlib/public/runtime/ProtocolConformance.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ static bool _checkWitnessTableIsolation(
444444
llvm::ArrayRef<const void *> conditionalArgs,
445445
ConformanceExecutionContext &context
446446
) {
447-
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES && SWIFT_PTRAUTH
447+
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
448448
auto description = lookThroughOptionalConditionalWitnessTable(
449449
reinterpret_cast<const RelativeWitnessTable *>(wtable))
450450
->getDescription();

0 commit comments

Comments
 (0)