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

8258956: Memory Leak in StringCoding on ThreadLocal resultCached StringCoding.Result #2064

wants to merge 2 commits into from


Copy link

@naotoj naotoj commented Jan 13, 2021

Please review the fix to this issue. Unused thread local StringCoding.Result is now wrapped with SoftReference, which can be GC'ed as needed. I confirmed it worked as expected with a test case (, but decided not to include it in this PR. This is because I purposefully chose the size of the byte array and max heap size which is fragile, and could become noise in a regression test run.


  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed


  • JDK-8258956: Memory Leak in StringCoding on ThreadLocal resultCached StringCoding.Result



$ git fetch pull/2064/head:pull/2064
$ git checkout pull/2064

Copy link

@bridgekeeper bridgekeeper bot commented Jan 13, 2021

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Jan 13, 2021
Copy link

@openjdk openjdk bot commented Jan 13, 2021

@naotoj The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs label Jan 13, 2021
Copy link

@mlbridge mlbridge bot commented Jan 13, 2021


Copy link

@openjdk openjdk bot commented Jan 13, 2021

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8258956: Memory Leak in StringCoding on ThreadLocal resultCached StringCoding.Result

Reviewed-by: rriggs, alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 26 new commits pushed to the master branch:

  • 8b8b1f9: 8259706: C2 compilation fails with assert(vtable_index == Method::invalid_vtable_index) failed: correct sentinel value
  • ae9187d: 8256109: Create implementation for NSAccessibilityButton protocol
  • 5513f98: 8258010: Debug build failure with clang-10 due to -Wdeprecated-copy
  • 51e14f2: Merge
  • 5926d75: 8259719: ProblemList runtime/cds/appcds/jigsaw/modulepath/ on Windows
  • 8abefde: 8259720: ProblemList java/awt/Focus/AppletInitialFocusTest/ on Windows
  • fb8ac24: 8259722: ProblemList two jdk/jfr/startupargs tests on Windows
  • ac4cd2e: 8231461: static/instance overload leads to 'unexpected static method found in unbound lookup' when resolving method reference
  • 42d2d6d: 8259063: Possible deadlock with vtable/itable creation vs concurrent class unloading
  • 6bb6093: 8259657: typo in generated HELP page prevents localization
  • ... and 16 more:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jan 13, 2021
Copy link
Member Author

@naotoj naotoj commented Jan 14, 2021


@openjdk openjdk bot closed this Jan 14, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jan 14, 2021
Copy link

@openjdk openjdk bot commented Jan 14, 2021

@naotoj Since your change was applied there have been 36 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit aba3431.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@naotoj naotoj deleted the naotoj:JDK-8258956 branch Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants