Skip to content

[6.2][Distributed] Fix computed properties in protocols on arm64e #82010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 5, 2025

Description:
This actually manifested as an pointer auth crash, but the real reason being is that we messed up the order of elements in the witness table. If we'd skip the accessor like this, the types we sign/auth with would no longer align and manifest in a crash.

There is no real reason to skip this entry so we just bring it back, and avoid making this special in any way.

Scope/Impact: Computed distributed properties in distributed protocols were not usable on arm64e before this change. Causing trouble to some protocols being adopted to distributed actors.

Risk: Low, the change removes a special case that was not necessary specifically in distributed computed property accessor entries in witness tables. No impact on other code.

Testing: CI testing, verified the arm64e issue specifically locally
Reviewed by: @xedin

Original PR: #82009
Radar: rdar://125628060

This actually manifested as an pointer auth crash, but the real reason
being is that we messed up the order of elements in the witness table.
If we'd skip the accessor like this, the types we sign/auth with would
no longer align and manifest in a crash.

There is no real reason to skip this entry so we just bring it back, and
avoid making this special in any way.

This unlocks a few tests as well as corrects any distributed+protocol
use where a requirement distributed var was _followed by_ other
requirements.

resolves rdar://125628060
@ktoso ktoso requested a review from a team as a code owner June 5, 2025 03:19
@ktoso ktoso changed the title [Distributed] Fix computed properties in protocols on arm64e [6.2][Distributed] Fix computed properties in protocols on arm64e Jun 5, 2025
@ktoso ktoso added distributed Feature → concurrency: distributed actor 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Jun 5, 2025
@ktoso ktoso force-pushed the pick-wip-fix-computed-variables-arm64-protocol-dist branch from 3ed204a to 08d8278 Compare June 5, 2025 07:57
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2025

@swift-ci please test

We had a number of problems either "only in" or "only without" library
evolution and protocols, so in order to increase the test coverage, run
a few of the crucial tests in both modes.
@ktoso ktoso force-pushed the pick-wip-fix-computed-variables-arm64-protocol-dist branch from 08d8278 to 363cbae Compare June 5, 2025 22:05
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2025

@swift-ci please test

@ktoso ktoso merged commit 2e368ce into swiftlang:release/6.2 Jun 10, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor 🍒 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