On Fri, 4 Sep 2026 14:35:34 GMT, Per Minborg <[email protected]> wrote:

> This PR proposes to fix an error in `SegmentBulkOperations::mismatch` so it 
> will throw `IllegalStateException` on closed zero-sized memory segments.
> 
> A new test is also proposed.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java 
line 261:

> 259:         if (length == 0) {
> 260:             // No memory access occurs below, so the segments' states 
> must be checked explicitly.
> 261:             src.sessionImpl().checkValidState();

Can you please check other bulk ops like copy and fill? I'm not sure we always 
do this?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32708#discussion_r3935183176

Reply via email to