RFR: 8299684: (bf) JNI direct buffer functions with large capacity behave unexpectedly [v8]

Brian Burkhalter bpb at openjdk.org
Wed Jan 11 23:18:58 UTC 2023


> Remove cast in `JNI::NewDirectByteBuffer`of `long` capacity to `int`, modify the constructor in question to accept a `long` capacity, and verify in the constructor that the  capacity does not overflow `int` range, throwing IAE If it does.

Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:

  8299684: Convert test to JUnit 5; require 64-bit system with at least 8GB of memory

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11873/files
  - new: https://git.openjdk.org/jdk/pull/11873/files/95fd6652..7f99faee

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11873&range=07
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11873&range=06-07

  Stats: 76 lines in 1 file changed: 16 ins; 27 del; 33 mod
  Patch: https://git.openjdk.org/jdk/pull/11873.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11873/head:pull/11873

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


More information about the nio-dev mailing list