Skip to content

[Distributed] Invoking distributed func defined via extension crashes on x86 #42423

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions test/Distributed/Runtime/distributed_actor_hop_to.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// FIXME(distributed): Distributed actors currently have some issues on windows, isRemote always returns false. rdar://82593574
// UNSUPPORTED: OS=windows-msvc


import Distributed
import FakeDistributedActorSystems

Expand All @@ -41,12 +40,17 @@ distributed actor Worker: LifecycleWatch {

@main struct Main {
static func main() async {
let worker: any LifecycleWatch = Worker(actorSystem: DefaultDistributedActorSystem())
try! await worker.test(x: 42, "on protocol")
let actorSystem = DefaultDistributedActorSystem()

let worker: any LifecycleWatch = Worker(actorSystem: actorSystem)
// ==== --------------------------------------------------------------------

let remote = try! Worker.resolve(id: worker.id, using: actorSystem)
let remoteAny: any LifecycleWatch = remote
try! await remoteAny.test(x: 42, "direct") // Remote call
// CHECK: >> remoteCallVoid: on:main.Worker, target:test(x:_:)
// CHECK: << onReturnVoid: ()

// CHECK: executed: test(x:_:)
// CHECK: executed: watch(x:_:) - x = 42, y = on protocol
// CHECK: done executed: test(x:_:)

print("OK") // CHECK: OK
}
Expand Down