Skip to content

Commit 4b99067

Browse files
committed
[IRGen] Mark protocol requirement descriptor for distributed thunk as async
Fixes a bug where descriptor for protocol requirement associated with distributed thunk wasn't marked as `async` that results in ptrauth failures because discriminator would be misaligned between requirement and witness. Resolves: rdar://96520492
1 parent 3aac72e commit 4b99067

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/IRGen/GenMeta.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,10 @@ namespace {
913913
if (entry.getFunction().isAutoDiffDerivativeFunction())
914914
declRef = declRef.asAutoDiffDerivativeFunction(
915915
entry.getFunction().getAutoDiffDerivativeFunctionIdentifier());
916+
if (entry.getFunction().isDistributedThunk()) {
917+
flags = flags.withIsAsync(true);
918+
declRef = declRef.asDistributed();
919+
}
916920
addDiscriminator(flags, schema, declRef);
917921
}
918922

0 commit comments

Comments
 (0)