Skip to content

Commit 3df7b67

Browse files
committed
[IRGen] Sign task resume context in swift_suspend_point.
rdar://72357371
1 parent 73c9733 commit 3df7b67

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/IRGen/GenFunc.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2559,6 +2559,11 @@ llvm::Function *IRGenFunction::createAsyncSuspendFn() {
25592559
auto *resumeAddr = Builder.CreateStructGEP(task, 4);
25602560
Builder.CreateStore(resumeFunction, Address(resumeAddr, ptrAlign));
25612561
auto *contextAddr = Builder.CreateStructGEP(task, 5);
2562+
if (auto schema = IGM.getOptions().PointerAuth.TaskResumeContext) {
2563+
auto authInfo = PointerAuthInfo::emit(suspendIGF, schema, contextAddr,
2564+
PointerAuthEntity());
2565+
context = emitPointerAuthSign(suspendIGF, context, authInfo);
2566+
}
25622567
Builder.CreateStore(context, Address(contextAddr, ptrAlign));
25632568
auto *suspendCall = Builder.CreateCall(
25642569
IGM.getTaskSwitchFuncFn(),

test/Concurrency/Runtime/actor_counters.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
// Remove with rdar://problem/72439642
88
// UNSUPPORTED: asan
9-
// Remove with rdar://problem/72357371
10-
// UNSUPPORTED: CPU=arm64e
119

1210
#if canImport(Darwin)
1311
import Darwin

test/Concurrency/Runtime/mainactor.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
// REQUIRES: OS=macosx || OS=ios
77
// FIXME: should not require Darwin to run this test once we have async main!
8-
// Remove with rdar://problem/72357371
9-
// UNSUPPORTED: CPU=arm64e
108

119
// for exit(:Int)
1210
#if canImport(Darwin)

0 commit comments

Comments
 (0)