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). ------------- Commit messages: - Fix mismatch issue with zero-length segments Changes: https://git.openjdk.org/jdk/pull/32708/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32708&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8391837 Stats: 15 lines in 2 files changed: 14 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/32708.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32708/head:pull/32708 PR: https://git.openjdk.org/jdk/pull/32708
