Skip to content

[Distributed] Fix computed properties in protocols on arm64e #82009

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

Merged

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jun 5, 2025

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.

Huge thanks to @xedin for help tracking this down.

resolves rdar://125628060

@ktoso ktoso requested a review from rjmccall as a code owner June 5, 2025 03:02
@ktoso ktoso requested review from xedin, DougGregor and hborla June 5, 2025 03:04
// We avoid emitting _distributed_get accessors, as they cannot be
// referred to anyway
continue;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out this was overdoing it.

@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2025

@swift-ci please smoke test

@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Jun 5, 2025
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 force-pushed the wip-fix-computed-variables-arm64-protocol-dist branch 3 times, most recently from 4553c29 to 328f110 Compare June 5, 2025 08:02
@ktoso ktoso requested a review from xedin June 5, 2025 08:03
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2025

@swift-ci please smoke 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 wip-fix-computed-variables-arm64-protocol-dist branch from 328f110 to cedcd4a Compare June 5, 2025 22:06
@ktoso
Copy link
Contributor Author

ktoso commented Jun 5, 2025

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jun 6, 2025

@swift-ci please smoke test macOS

@ktoso
Copy link
Contributor Author

ktoso commented Jun 6, 2025

@swift-ci please smoke test Linux

@ktoso ktoso merged commit 21291a4 into swiftlang:main Jun 9, 2025
3 checks passed
@ktoso ktoso deleted the wip-fix-computed-variables-arm64-protocol-dist branch June 9, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants