swiftlang / swiftlang/swift-corelibs-libdispatch
[SR-2181] DispatchTimeInterval.nanoseconds won't work well on 32-bit architectures
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.6k
- Forks
- 496
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
| Previous ID | SR-2181 |
| Radar | rdar://problem/79952338 |
| Original Reporter | @lilyball |
| Type | Bug |
Environment
swift-DEVELOPMENT-SNAPSHOT-2016-07-25-a-125-g3331dc4
Additional Detail from JIRA
| Votes | 0 |
| Component/s | libdispatch |
| Labels | Bug |
| Assignee | None |
| Priority | Medium |
md5: fd6368c309cba792844d510ee431fa26
Issue Description:
DispatchTimeInterval is defined in terms of an Int. This isn't going to work well on a 32-bit architectures for nanoseconds, because it will only be able to represent just over 2 seconds worth of nanoseconds. There's a reason why the underlying APIs use UInt64 instead of a platform-defined integer.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no file or test. Start by locating the definition of DispatchTimeInterval and the libdispatch nanosecond APIs, then inspect how integer widths differ on 32-bit architectures. Done means nanosecond intervals beyond roughly two seconds are representable and the relevant behavior is validated on 32-bit targets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, swift
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100