-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
Describe the bug
When providing more than 64 KiB of input, the program will crash with Fatal error: DispatchIO <OS_dispatch_io: 0x...> was not closed
.
To Reproduce
import Foundation
import Subprocess
import System
@main
struct App {
static func main() async throws {
let byteCount = 65537 // One less and it works.
let data = Data([UInt8](repeating: 1, count: byteCount))
let input = String(data: data, encoding: .ascii)!
let result = try await run(
.name("echo"),
arguments: [ "Hello" ],
input: .string(input),
output: .string,
error: .string
)
print(result)
}
}
Expected behavior
Does not crash.
Environment (please complete the following information):
- Subprocess adc2749
- macOS 15.5
- Apple Swift version 6.1.2 (swift-6.1.2-RELEASE) Target: arm64-apple-macosx15.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working