Skip to content

Conversation

@bplb
Copy link
Member

@bplb bplb commented Oct 5, 2022

Catch any Throwable from the Deallocator constructor or Cleaner::create and free memory to prevent a leak.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8294717: (bf) DirectByteBuffer constructor will leak if allocating Deallocator or Cleaner fails with OOME

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/10588/head:pull/10588
$ git checkout pull/10588

Update a local copy of the PR:
$ git checkout pull/10588
$ git pull https://git.openjdk.org/jdk pull/10588/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10588

View PR using the GUI difftool:
$ git pr show -t 10588

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/10588.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 5, 2022

👋 Welcome back bpb! 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 Pull request is ready for review label Oct 5, 2022
@openjdk
Copy link

openjdk bot commented Oct 5, 2022

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

  • nio

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 nio nio-dev@openjdk.org label Oct 5, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 6, 2022

Webrevs

@openjdk
Copy link

openjdk bot commented Oct 7, 2022

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

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

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

8294717: (bf) DirectByteBuffer constructor will leak if allocating Deallocator or Cleaner fails with OOME

Reviewed-by: 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 21 new commits pushed to the master branch:

  • 2d25c0a: 8292280: Unused field 'keyListener' in BasicRadioButtonUI
  • 0ad6803: 8293810: Remove granting of RuntimePermission("stopThread") from tests
  • cf84c8e: 8292975: javac produces code that crashes with LambdaConversionException
  • f3a44a4: 8075916: The regression-swing case failed as colored text is not shown on disabled checkbox and radio button with Nimbus LAF
  • 37bd4fb: 6852577: Only for Nimbus LAF UIManager.get("PasswordField.echoChar") is null
  • d4c9a88: 6560981: (cal) unused local variables in GregorianCalendar, etc.
  • 5dd851d: 8281453: New optimization: convert ~x into -1-x when ~x is used in an arithmetic expression
  • 85569e9: 8286037: Bump minimum boot jdk to JDK 19
  • fef345b: 8293672: Update freetype md file
  • 5c030cc: 8290973: In AffineTransform, equals(Object) is inconsistent with hashCode()
  • ... and 11 more: https://git.openjdk.org/jdk/compare/0ec18382b74396eec0681f2fdf0dac40f8fe108b...master

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 Pull request is ready to be integrated label Oct 7, 2022
@bplb
Copy link
Member Author

bplb commented Oct 7, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Oct 7, 2022

Going to push as commit 4cbac40.
Since your change was applied there have been 28 commits pushed to the master branch:

  • c1166a3: 8289561: java/lang/instrument/NativeMethodPrefixAgent.java fails with "ERROR: Injection failure: java.lang.UnsupportedOperationException: Records requires ASM8"
  • a1747ef: 8294941: GHA: Cut down cross-compilation sysroots
  • 67210ab: 8286394: Address possibly lossy conversions in jdk.naming.dns
  • 7a194d3: 8290154: [JVMCI] partially implement JVMCI for RISC-V
  • b38bed6: 8294308: Allow dynamically choosing the MEMFLAGS of a type without ResourceObj
  • 118d93b: 8294907: Remove unused NativeLookup::dll_load
  • 1fda842: 8291429: java/lang/Thread/virtual/ThreadAPI.java timed out on single core system
  • 2d25c0a: 8292280: Unused field 'keyListener' in BasicRadioButtonUI
  • 0ad6803: 8293810: Remove granting of RuntimePermission("stopThread") from tests
  • cf84c8e: 8292975: javac produces code that crashes with LambdaConversionException
  • ... and 18 more: https://git.openjdk.org/jdk/compare/0ec18382b74396eec0681f2fdf0dac40f8fe108b...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 7, 2022
@openjdk openjdk bot closed this Oct 7, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 7, 2022
@openjdk
Copy link

openjdk bot commented Oct 7, 2022

@bplb Pushed as commit 4cbac40.

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

@bplb bplb deleted the DirectBuffer-leak-8294717 branch November 1, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated nio nio-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants