[foreign-memaccess+abi] Integrated: Fix bug in hashCode after JDK-8291473

Maurizio Cimadamore mcimadamore at openjdk.org
Wed Aug 10 11:55:49 UTC 2022


On Tue, 9 Aug 2022 12:05:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> There is an asymmetry between MemorySegment::equals and MemorySegment::hashCode after the unification of memory segment and memory address.
> 
> Both methods should only take into account unsafe offset and base (e.g. two segments are equals if they point to same memory location).

This pull request has now been integrated.

Changeset: 1db053f7
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.org/panama-foreign/commit/1db053f7c9f24ef99b15c3c20969375689c28335
Stats:     26 lines in 2 files changed: 19 ins; 4 del; 3 mod

Fix bug in hashCode after JDK-8291473

Reviewed-by: jvernee

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

PR: https://git.openjdk.org/panama-foreign/pull/701


More information about the panama-dev mailing list