Skip to content

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented May 24, 2025

Description:

In #81229 we used the wrong discriminator number: we used the witness table discriminator for the TaskPriority:

	mov	x17, x8
	movk	x17, #11839, lsl #48 <<<<< bad
	autda	x16, x17

while we should have used the one for the branch itself:

	stur	x1, [x29, #-32]
	bl	static Swift.TaskPriority.default.getter : Swift.TaskPriority
	mov	x0, x20
	bl	_swift_retain
	ldur	x8, [x29, #-88]
	ldur	x1, [x29, #-56]
	mov	x0, x1
	mov	x17, #3955 <<<<<< good
	blraa	x8, x17

This "actually" resolves rdar://150378890 which #81229 was intending to do

Scope/Impact: Only fixes the value used for pointer signing
Risk: Low; without change this API never worked before on arm64e.
Testing: Manually verified this is the correct signing
Reviewed by: @mikeash

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

@ktoso ktoso requested a review from a team as a code owner May 24, 2025 00:09
@ktoso ktoso requested review from mikeash, DougGregor and hborla May 24, 2025 00:09
@ktoso
Copy link
Contributor Author

ktoso commented May 24, 2025

@swift-ci please test

@ktoso ktoso changed the title [Concurrency] Correct the signing of priority escalation handler [6.2][Concurrency] Correct the signing of priority escalation handler May 24, 2025
@ktoso ktoso added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels May 27, 2025
@ktoso ktoso enabled auto-merge May 27, 2025 20:48
@ktoso ktoso merged commit ab46cc8 into swiftlang:release/6.2 May 27, 2025
5 checks passed
@ktoso ktoso deleted the pick-wip-correct-signing-num branch May 27, 2025 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 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