Skip to content

Commit faa814c

Browse files
committed
[ptrauth] Adapted authinfo for async PAF callees.
Fixes arm64e non-executable test failures of IRGen/async/partial_apply.sil and IRGen/async/partial_apply_forwarder.sil.
1 parent 6e2338c commit faa814c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/IRGen/GenFunc.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,9 +1164,14 @@ class AsyncPartialApplicationForwarderEmission
11641164
return fnPtr;
11651165
}
11661166
llvm::CallInst *createCall(FunctionPointer &fnPtr) override {
1167+
PointerAuthInfo newAuthInfo;
1168+
if (auto authInfo = fnPtr.getAuthInfo()) {
1169+
newAuthInfo = PointerAuthInfo(authInfo.getCorrespondingCodeKey(),
1170+
authInfo.getDiscriminator());
1171+
}
11671172
auto newFnPtr = FunctionPointer(
1168-
FunctionPointer::Kind::Function, fnPtr.getPointer(subIGF),
1169-
fnPtr.getAuthInfo(), Signature::forAsyncAwait(subIGF.IGM, origType));
1173+
FunctionPointer::Kind::Function, fnPtr.getPointer(subIGF), newAuthInfo,
1174+
Signature::forAsyncAwait(subIGF.IGM, origType));
11701175
auto &Builder = subIGF.Builder;
11711176

11721177
auto argValues = args.claimAll();

0 commit comments

Comments
 (0)