[jdk23] RFR: 8333849: (dc) DatagramChannel send/receive fails with UOE if buffer backed by memory segment allocated from shared arena

Daniel Fuchs dfuchs at openjdk.org
Fri Jun 28 14:09:30 UTC 2024


Hi, this is a clean backport of [JDK-8333849](https://bugs.openjdk.org/browse/JDK-8333849) to JDK 23.

JDK-8333849 fixes a bug that prevents using ByteBuffers derived from MemorySegments allocated from a shared arena with DatagramChannel. I believe the fix is important enough to justify backporting it to JDK 23 in this phase.

The fix, and test, have soaked in the mainline for two weeks already - without causing any regression.

-------------

Commit messages:
 - Backport e7dc76b5776e05082281fb640d1592479cfe9e6b

Changes: https://git.openjdk.org/jdk/pull/19941/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19941&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8333849
  Stats: 509 lines in 2 files changed: 506 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/19941.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19941/head:pull/19941

PR: https://git.openjdk.org/jdk/pull/19941


More information about the nio-dev mailing list