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

[5.2] SR-7732: Dynamic casting CFError to Error results in a memory leak (from #28686) #28754

Merged
merged 5 commits into from Dec 13, 2019

Conversation

tbkka
Copy link
Contributor

@tbkka tbkka commented Dec 12, 2019

The special handling for casting CFError/NSError to Swift Error
type was using cleanup code that didn't correctly handle this case.
This replaces the cleanup code with a more targeted version.

Resolves SR-7732
Resolves rdar://40423061

The special handling for casting CFError/NSError to Swift Error
type was using cleanup code that didn't correctly handle this case.
This replaces the cleanup code with a more targeted version.

Fixes: SR-7732
Fixes: rdar://problem/40423061
I've verified this simplified test still leaks with
the original code and does not leak with the fixed code.
@tbkka tbkka requested a review from a team as a code owner December 12, 2019 20:41
@tbkka tbkka changed the title Cherry-pick SR-7732 from master to 5.2 branch [5.2] SR-7732: Dynamic casting CFError to Error results in a memory leak (from #28686) Dec 12, 2019
@tbkka
Copy link
Contributor Author

tbkka commented Dec 12, 2019

Cherry-picking from #28686 as requested by @DougGregor

@tbkka
Copy link
Contributor Author

tbkka commented Dec 13, 2019

@swift-ci Please test Linux

@tbkka
Copy link
Contributor Author

tbkka commented Dec 13, 2019

@swift-ci Please test macOS

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants