Skip to content

[SR-15255] Windows: Calling URL(contentsOf:) repeatedly crashes #312

Open
@adam-fowler

Description

@adam-fowler
Previous ID SR-15255
Radar None
Original Reporter @adam-fowler
Type Bug
Environment

Run inside GitHub action using `compnerd/gha-setup-swift`

jobs:
  windows:
    runs-on: windows-latest
    steps:
      - uses: compnerd/gha-setup-swift@main
        with:
          branch: swift-5.5-release
          tag: 5.5-RELEASE
      - uses: actions/checkout@v2
      - run: swift test

I don't have a Windows setup so cannot test locally

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: fad9bd9ca6233534ee2375c19875deab

Issue Description:

The following code crashes on Windows.

func testURLs() throws {
    for _ in 0..<20 {
        if let url = URL(string: "https://raw.githubusercontent.com/jmespath/jmespath.test/master/tests/filters.json") {
            _ = try Data(contentsOf: url)
        }
    }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions