🐞 Possible memory leak in CurrentUser struct
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- macos, swift
- Domain
- desktop-dev, operating-systems
Research direction
Start at CurrentUser.getCurrentUser(), which is called when opening a workspace and creating a terminal. Inspect how the UnsafeMutablePointer is obtained and who owns it before changing deallocation; reproduce the workspace flow and verify the process no longer leaks or crashes.
Written by the indexing model from the issue text.
Description
Description
In CurrentUser.getCurrentUser(), an UnsafeMutablePointer<passwd> is allocated but never explicitly freed. When I added a deallocate() call in a defer block, the process crashed saying the pointer was freed but never allocated. I am uncertain if there is a memory leak here.
To Reproduce
- Open a workspace, thus creating a terminal, which calls
CurrentUser.getCurrentUser().
Expected Behavior
No memory leak, but, again, I am uncertain if there is actually a leak here.
Version Information
CodeEdit: 0.3.6-dev (37)
macOS: 15.6.1
Xcode: 26.0
Additional Context
No response
Screenshots
No response
- Dominant language
- Swift
- Stars
- 23k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Getting set up
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.
More from CodeEditApp/CodeEdit
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
CodeEditApp/CodeEdit#2190 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 15/100
CodeEditApp/CodeEdit#2195 · 8 reactions ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
CodeEditApp/CodeEdit#2185 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
CodeEditApp/CodeEdit#2181 ·
-
creashes on startingOpenbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
CodeEditApp/CodeEdit#2180 ·
All issues in CodeEditApp/CodeEdit
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solana-foundation/pay-kit#341 ·
Maintainers usually reply within 1 day
-
area:dictation bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
uttrflow/uttrflow-swift#1584 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
521xueweihan/HelloGitHub#3779 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
🎉 Add OmniDockOpenaddition
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
jaywcjlove/awesome-mac#3009 ·
Maintainers usually reply within 5 days