Skip to content

Commit 7091e0d

Browse files
committed
[PtrAuth] Auth parent async context after loading.
1 parent d4be3e8 commit 7091e0d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/IRGen/GenFunc.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2391,7 +2391,12 @@ llvm::Function *IRGenFunction::getOrCreateResumePrjFn() {
23912391
auto &Builder = IGF.Builder;
23922392
auto addr = Builder.CreateBitOrPointerCast(&(*it), IGF.IGM.Int8PtrPtrTy);
23932393
Address callerContextAddr(addr, IGF.IGM.getPointerAlignment());
2394-
auto callerContext = Builder.CreateLoad(callerContextAddr);
2394+
llvm::Value *callerContext = Builder.CreateLoad(callerContextAddr);
2395+
if (auto schema = IGF.IGM.getOptions().PointerAuth.AsyncContextParent) {
2396+
auto authInfo =
2397+
PointerAuthInfo::emit(IGF, schema, addr, PointerAuthEntity());
2398+
callerContext = emitPointerAuthAuth(IGF, callerContext, authInfo);
2399+
}
23952400
Builder.CreateRet(callerContext);
23962401
},
23972402
false /*isNoInline*/));

0 commit comments

Comments
 (0)