Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7592] Memory leak in SwiftPM Basic.Process #5406

Closed
swift-ci opened this issue May 3, 2018 · 3 comments
Closed

[SR-7592] Memory leak in SwiftPM Basic.Process #5406

swift-ci opened this issue May 3, 2018 · 3 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented May 3, 2018

Previous ID SR-7592
Radar rdar://problem/39941196
Original Reporter gmilos (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: b4338aafd1036e53af95c900f32906c2

Issue Description:

There is a memory leak in Process.launch() when redirectOutput is set to true:

var thread = Thread {
self.stdout.result = self.readOutput(onFD: outputPipe[0])
}
thread.start()
self.stdout.thread = thread

Reference cycle is as follows:

Thread > closure @ 330-334 -> self [==Process] -> stdout.thread -> Thread

Reproduction attached.

@ankitspd
Copy link
Member

ankitspd commented May 3, 2018

Thanks!

@ankitspd
Copy link
Member

ankitspd commented May 3, 2018

@swift-ci create

@bscothern
Copy link
Contributor

I just opened a pull request that should fix this and the other small memory leaks in SwiftPM.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants