Skip to content

Commit 413349a

Browse files
authored
Merge pull request #81230 from ktoso/pick-wip-escalation-handler-priority-auth
[6.2][Concurrency] Fix ptr auth for task priority escalation handler
2 parents 8a1d1f2 + 3615dbf commit 413349a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ namespace SpecialPointerAuthDiscriminators {
17651765
const uint16_t AsyncContextParent = 0xbda2; // = 48546
17661766
const uint16_t AsyncContextResume = 0xd707; // = 55047
17671767
const uint16_t AsyncContextYield = 0xe207; // = 57863
1768-
const uint16_t CancellationNotificationFunction = 0x1933; // = 6451
1768+
const uint16_t CancellationNotificationFunction = 0x2E3F; // = 11839 (TaskPriority, TaskPriority) -> Void
17691769
const uint16_t EscalationNotificationFunction = 0x7861; // = 30817
17701770
const uint16_t AsyncThinNullaryFunction = 0x0f08; // = 3848
17711771
const uint16_t AsyncFutureFunction = 0x720f; // = 29199

stdlib/public/Concurrency/Task.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1816,8 +1816,9 @@ swift_task_addPriorityEscalationHandlerImpl(
18161816
void *context) {
18171817
void *allocation =
18181818
swift_task_alloc(sizeof(EscalationNotificationStatusRecord));
1819+
auto unsigned_handler = swift_auth_code(handler, 11839);
18191820
auto *record = ::new (allocation)
1820-
EscalationNotificationStatusRecord(handler, context);
1821+
EscalationNotificationStatusRecord(unsigned_handler, context);
18211822

18221823
addStatusRecordToSelf(record, [&](ActiveTaskStatus oldStatus, ActiveTaskStatus& newStatus) {
18231824
return true;

0 commit comments

Comments
 (0)