On Wed, 28 May 2025 09:06:57 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> After https://bugs.openjdk.org/browse/JDK-8345687 was integrated, zero-length 
> segments always have an address of zero. This may cause problems in certain 
> native methods that can receive segments and/or buffers derived from segments.
> 
> This PR also guards for overflow for extremely large allocation requests.

Very good catch -- and good thing you added more tests! In the PR I linked, it 
seems that a test has been added for this case -- but sadly that test doesn't 
check for `address() != 0` -- you have now fixed that -- thanks.

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

Marked as reviewed by mcimadamore (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25485#pullrequestreview-2874495380

Reply via email to