Skip to content

[Runtime] Handle relative witness tables in _getIsolationCheckingOptionsFromExecutorWitnessTable #80838

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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions stdlib/public/Concurrency/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,13 @@ extern "C" SWIFT_CC(swift) void _swift_task_enqueueOnExecutor(
static swift_task_is_current_executor_flag
_getIsolationCheckingOptionsFromExecutorWitnessTable(const SerialExecutorWitnessTable *_wtable) {
const WitnessTable* wtable = reinterpret_cast<const WitnessTable*>(_wtable);
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
auto description = lookThroughOptionalConditionalWitnessTable(
reinterpret_cast<const RelativeWitnessTable*>(wtable))
->getDescription();
#else
auto description = wtable->getDescription();
#endif
if (!description) {
return swift_task_is_current_executor_flag::None;
}
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/runtime/ProtocolConformance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ static bool _checkWitnessTableIsolation(
llvm::ArrayRef<const void *> conditionalArgs,
ConformanceExecutionContext &context
) {
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES && SWIFT_PTRAUTH
#if SWIFT_STDLIB_USE_RELATIVE_PROTOCOL_WITNESS_TABLES
auto description = lookThroughOptionalConditionalWitnessTable(
reinterpret_cast<const RelativeWitnessTable *>(wtable))
->getDescription();
Expand Down