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

Jorn Vernee jvernee at openjdk.org
Tue Aug 9 12:52:43 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).

Looks good.

Does it seem useful to add a test for this?

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

Marked as reviewed by jvernee (Committer).

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


More information about the panama-dev mailing list