RFR: 8323552: AbstractMemorySegmentImpl#mismatch returns -1 when comparing distinct areas of the same instance of MemorySegment
Peter Levart
plevart at openjdk.org
Wed Jan 10 21:12:32 UTC 2024
I belive there is a bug in `AbstractMemorySegmentImpl#mismatch` method. It returns `-1` (meaning that regions are equal) when passing the same instance of MemorySegment as both `srcSegment` and `dstSegment` parameters regardless of whether `srcFromOffset` and `dstFromOffset` as well as `srcToOffset` and `dstToOffset` are also equal.
Am I right?
-------------
Commit messages:
- fix mismatch avoidance of memory comparison
Changes: https://git.openjdk.org/jdk/pull/17354/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17354&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8323552
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17354.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17354/head:pull/17354
PR: https://git.openjdk.org/jdk/pull/17354
More information about the core-libs-dev
mailing list