Skip to content
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

[SR-14374] Simple program crashes when using experimental concurrency features on Windows #56732

Closed
MarSe32m opened this issue Mar 19, 2021 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features Windows Platform: Windows

Comments

@MarSe32m
Copy link

Previous ID SR-14374
Radar None
Original Reporter @MarSe32m
Type Bug
Status Resolved
Resolution Done
Environment

swift --version
compnerd.org Swift version 5.5-dev (LLVM 9c34c22, Swift 4bffcac)
Target: x86_64-unknown-windows-msvc

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, Concurrency, Windows
Assignee @compnerd
Priority Medium

md5: f51d1b2030a028b6a773b00b81d9e05c

Issue Description:

This program consists of two files:

Application.swift

@main
public struct Main {
    public static func main() async {
        var i = 0
        while i < 10 {
            await hello(i)
            i += 1
        }
    }
}
 

Utility.swift

@MainActor
func hello(_ i: Int) async {
    print("Hello world", i)
}

and the Package.swift

// swift-tools-version:5.4
import PackageDescription

let package = Package(
    name: "asyncbug",
    targets: [
        .executableTarget(
            name: "asyncbug",
            swiftSettings: [.unsafeFlags(["-Xfrontend", "-enable-experimental-concurrency"])]),
        .testTarget(
            name: "asyncbugTests",
            dependencies: ["asyncbug"]),
    ]
)

After

swift run

the output is only

Hello world 0
Hello world 1
Hello world 2
Hello world 3

and then the program crashes.

@typesanitizer
Copy link

cc @compnerd

@compnerd
Copy link
Collaborator

I believe that this is fully resolved at this point on main.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features Windows Platform: Windows
Projects
None yet
Development

No branches or pull requests

3 participants