-
Notifications
You must be signed in to change notification settings - Fork 10.5k
🍒[5.7][IRGen/Distributed] Adjust protocol requirement and witness table to handle distributed thunks #60189
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
…lRef` While building witness table record, let's use `hasAsync()` check on `SILDeclRef` of the requirement instead of reaching for the underlying declaration because the reference should be the source of truth about `async` and other attributes. In case of distributed thunk witness, which is always `async throws`, the underlying declaration could be sync because it's the protocol requirement declaration.
… async Fixes a bug where descriptor for protocol requirement associated with distributed thunk wasn't marked as `async` that results in ptrauth failures because discriminator would be misaligned between requirement and witness. Resolves: rdar://96520492
@swift-ci please test |
@swift-ci please test apple silicon |
@swift-ci please nominate |
5.7 Linux CI is broken: rdar://97408321
|
swiftlang/swift-package-manager#5684 |
swiftlang/swift-package-manager#5684 |
swiftlang/swift-package-manager#5684 |
Reverts got merged (and thus failures like @swift-ci please test apple silicon |
@swift-ci please test apple silicon |
@swift-ci please test |
We're green, yay! Just need approval now 🙏 |
Description: Pointer authentication would fail on arm64e for distributed method witnesses where the requirement. This PR makes the necessary changes for the verification to look at the right discriminators.
This is necessary because SILDeclRef of the distributed thunk witness is anchored
on the requirement declaration which might not be async, but the witness itself is
always async throws.
Fixes a bug where descriptor for protocol requirement associated with
distributed thunk wasn't marked as async that results in ptrauth failures
because discriminator would be misaligned between requirement and witness.
Risk: Low, only fixes pointer auth for distributed protocol requirements and actors
Review by: @DougGregor @tkremenek
Testing: PR Testing, validated on arm64e
Original PR: #60184
Radar: rdar://97228310 rdar://96520492