macos: Make sure to decrement the ref count of the mach port on ChannelClosed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.1k
- Forks
- 161
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 1
Description
Similar to what is seen in #96 we should ensure that we do not have mach port leaks on ChannelClosed.
We should also use an auto-incrementing number as an id instead of the local_port cast to a u64(here and here) to avoid a race condition if the mach port number is reused. I do not know mach ports well enough to know if this is necessary yet.
Related to: #96 #105
Contributor guide
No contributing guide indexed for this repository
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
Start in src/platform/macos/mod.rs at the linked locations around lines 608 and 642, and compare the ChannelClosed handling with issue #96. Determine how mach-port reference counts should be decremented and whether the local_port-derived ID can race when ports are reused; done means both concerns are addressed without leaks or ID collisions, with related issues #96 and #105 considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100