Skip to content

Conversation

@ktoso
Copy link
Contributor

@ktoso ktoso commented May 1, 2025

Description: the new task priority escalation API was missing pointer auth signing on when we use the handler.

Scope/Impact: Makes withTaskPriorityEscalationHandler usable with pointer authentication.

Risk: Low, this was broken on ptr-auth before, no impact on other code.

Testing: CI testing
Reviewed by: @rjmccall

Original PR: #81229
Radar: rdar://150378890

We missed to sign the handler. Along the way the signature of it
changed, so adjust for that.

How to get the number:

```
func PROPER(bar: (TaskPriority, TaskPriority) -> Void) {
    let p = TaskPriority.default
    bar(p, p)
}
```

```
-> % swiftc -target arm64e-apple-macos13 example.swift -S -o - | swift demangle | grep -a3 autda
	stur	x8, [x29, #-64]
	mov	x17, x8
	movk	x17, swiftlang#11839, lsl swiftlang#48 <<<<<<<<<
	autda	x16, x17
	ldr	x8, [x16, swiftlang#64]
	lsr	x8, x8, #0
	add	x8, x8, swiftlang#15
```

Resolves rdar://150378890
@ktoso ktoso requested a review from a team as a code owner May 1, 2025 03:17
@ktoso
Copy link
Contributor Author

ktoso commented May 1, 2025

@swift-ci please test

@ktoso ktoso changed the title [Concurrency] Fix ptr auth for task priority escalation handler [6.2][Concurrency] Fix ptr auth for task priority escalation handler May 1, 2025
@ktoso
Copy link
Contributor Author

ktoso commented May 1, 2025

@swift-ci please test macOS

@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 1, 2025
@ktoso ktoso merged commit 413349a into swiftlang:release/6.2 May 1, 2025
5 checks passed
@ktoso ktoso deleted the pick-wip-escalation-handler-priority-auth branch May 1, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants