Skip to content

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

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

Closed
wants to merge 1 commit into from

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, 5.2 version is #2692

cc @weissi

@spevans
Copy link
Contributor Author

spevans commented Feb 23, 2020

@swift-ci test

Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

Thank you! Lgtm

@weissi
Copy link
Contributor

weissi commented Feb 24, 2020

@swift-ci test

@weissi
Copy link
Contributor

weissi commented Feb 26, 2020

@spevans this one failed the macOS Platform test twice, any ideas?

@spevans
Copy link
Contributor Author

spevans commented Feb 26, 2020

Looks to be unrelated since its python lint tests that are failing in the main swift repo. Note the macOS tests are normally ignored since they dont actually build swift-corelibs-foundation at all or run any of the tests - the CI really needs to be replaced for testing on macOS with something that does.

@weissi
Copy link
Contributor

weissi commented Feb 26, 2020

@shahmishal can we merge this? (See @spevans 's comment)

@weissi weissi requested a review from drexin April 1, 2020 20:15
@drexin
Copy link
Contributor

drexin commented Apr 1, 2020

@swift-ci test macos

@shahmishal
Copy link
Member

This is targeting swift-5.1-branch, we don't currently have plan on releasing new toolchain for 5.1.x.

@spevans spevans closed this Apr 3, 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.

4 participants