Skip to content

[5.2] SR-11917: Using JSONEncoder's .outputFormatting = .sortedKeys has a memory leak on Linux #2692

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

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Feb 23, 2020

  • Any use of NSString.compare(_:options:range:locale:) with a non-nil locale
    would leak on Linux.

  • _CFCompareStringsWithLocale was leaking the collator on non-macOS
    platforms.

  • Use the collator cache on Linux and Win32 the same way that macOS
    does.

(cherry picked from commit 1112582)

…emory leak on Linux

- Any use of NSString.compare(_:options:range:locale:) with a non-nil locale
  would leak on Linux.

- _CFCompareStringsWithLocale was leaking the collator on non-macOS
  platforms.

- Use the collator cache on Linux and Win32 the same way that macOS
  does.

(cherry picked from commit 1112582)
@spevans
Copy link
Contributor Author

spevans commented Feb 23, 2020

Backport of #2655

cc @millenomi

@spevans
Copy link
Contributor Author

spevans commented Feb 23, 2020

@swift-ci test linux

@spevans
Copy link
Contributor Author

spevans commented Mar 18, 2020

@swift-ci test macOS

@spevans
Copy link
Contributor Author

spevans commented Apr 1, 2020

cc @drexin

@weissi weissi requested a review from drexin April 1, 2020 20:15
@drexin drexin requested review from millenomi and removed request for millenomi April 1, 2020 20:33
Copy link
Contributor

@drexin drexin left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@drexin drexin merged commit 70ef255 into swiftlang:swift-5.2-branch Apr 1, 2020
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.

2 participants