[jdk11u-dev] RFR: 8053479: (dc) DatagramChannel.read() throws exception instead of discarding data when buffer too small

Kangcheng Xu kxu at openjdk.org
Wed Nov 22 15:21:31 UTC 2023


A clean backport of [JDK-8053479](https://bugs.openjdk.org/browse/JDK-8053479)

This is a Windows-only issue. The corresponding test is NOT part of `tier1` that's automatically verified by GHA. The following shows the test
- fails without the patch: https://github.com/tabjy/jdk11u-ci/actions/runs/6946796354/job/18900472321
- passes with the patch: https://github.com/tabjy/jdk11u-ci/actions/runs/6946228725/job/18903238261

One can verify locally with `make run-test-prebuilt TEST='test/jdk/java/nio/channels/DatagramChannel/Truncate.java' ...`

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

Commit messages:
 - Backport patch from 6ef474a4f4cfacc12db5e349c419fa4b41b346aa
 - Backport test from 6ef474a4f4cfacc12db5e349c419fa4b41b346aa

Changes: https://git.openjdk.org/jdk11u-dev/pull/2291/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=2291&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8053479
  Stats: 202 lines in 3 files changed: 157 ins; 17 del; 28 mod
  Patch: https://git.openjdk.org/jdk11u-dev/pull/2291.diff
  Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/2291/head:pull/2291

PR: https://git.openjdk.org/jdk11u-dev/pull/2291


More information about the jdk-updates-dev mailing list