swiftlang / swiftlang/swift-corelibs-libdispatch

[SR-2107] LIBDispatch DispatchIO read Max Int not reading until EOF

Open
#733 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug libdispatch SDKOverlay
Dominant language
C
Stars
2.6k
Forks
496
Avg merge
2d 6h
Merged PRs (30d)
3

Description

Previous ID SR-2107
Radar None
Original Reporter sandmman (JIRA User)
Type Bug
Environment

OSX Xcode 8

Additional Detail from JIRA
Votes 1
Component/s libdispatch
Labels Bug, SDKOverlay
Assignee None
Priority Medium

md5: 8a4cf83f85fd0da59a4731c667e0be19

Issue Description:

Although the previous iteration of dispatch_io_read() allows you to pass the value SIZE_MAX as the length in order to read the entire file until an EOF character is reached, DispatchIO.read() no longer supports this. Instead giving the value ```Int.max``` leads the channel to wait indefinitely until the max size is available to read.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce DispatchIO.read() on OSX with Xcode 8 using Int.max, then compare its behavior with the previous dispatch_io_read() API using SIZE_MAX. The issue is resolved when an Int.max read completes at EOF instead of waiting for the maximum size to become available.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.