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-5344] Memory leak in swift_EnumCaseName() ? #47918

Closed
swift-ci opened this issue Jun 30, 2017 · 2 comments
Closed

[SR-5344] Memory leak in swift_EnumCaseName() ? #47918

swift-ci opened this issue Jun 30, 2017 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. runtime The Swift Runtime standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-5344
Radar rdar://problem/33087194
Original Reporter paulmenage (JIRA User)
Type Bug
Status Closed
Resolution Done
Environment

Xcode 8.3, Xcode 9 beta, and github master (d44cdf4)

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Runtime
Assignee None
Priority Medium

md5: 3a32c20f858f1eef01c5996a6647efeb

Issue Description:

The following fragment appears to cause memory usage to grow unboundedly:

enum E { case A; case B(String) }
while true { var output = ""; dump(E.A, to: &output) }

I think that the issue is that when swift_EnumCaseName() is called with an enum type that has multiple cases and at least one object payload, it leaks a reference on its boxed-Any parameter.

@jckarter
Copy link
Member

@swift-ci create

@CodaFi
Copy link
Member

CodaFi commented Jul 16, 2018

Fixed by the merge of # 13792

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. runtime The Swift Runtime standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

3 participants