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

Alan Bateman alanb at openjdk.org
Thu Jan 19 07:56:32 UTC 2023


On Thu, 19 Jan 2023 07:42:54 GMT, David Holmes <dholmes at openjdk.org> wrote:

> How is `allocateMemory` going to respond to these illegal capacity requests?
> 
> If we expect `newDirectByteBuffer` to throw then can't we use a dummy buffer value as it will never be used?

For illegalCapacities it should call allocateMemory with some fixed value, say 1, not capacity. Surprised the allocateMemory isn't failing for the test inputs.

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

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


More information about the hotspot-dev mailing list