On Fri, 4 Sep 2026 14:52:29 GMT, Maurizio Cimadamore <[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?

I've found such a problem and it is tracked under a [separate 
issue](https://bugs.openjdk.org/browse/JDK-8391841)

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

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

Reply via email to