RFR: 8319211: Regression in LoopOverNonConstantFP

Jorn Vernee jvernee at openjdk.org
Wed Nov 1 14:37:03 UTC 2023


On Wed, 1 Nov 2023 14:10:10 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR fixes an inexact var handle call that sneaked in as part of https://git.openjdk.org/jdk/pull/16224.
> 
> As some default methods were moved from `MemorySegment` to `AbstractMemorySegmentImpl`, the type of `this` has changed, and this made all the var handle calls in the memory segment accessors inexact.
> 
> To prevent this issue from occurring again, I've added a new JDK flag to create _exact_ segment view var handles, so that we can test that segment accessors work even when using the stricter behavior.
> 
> I've considered using a flag for _all_ var handles (even non-FFM ones), but gave up when I saw that there is some JDK code that needs to pass `null` to some var handles, in which case exact behavior is not possible (at least not without fixing the use site to cast the `null` to the right type). This might be pursued as a separate effort.

Nice catch! Thanks for fixing.

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

Marked as reviewed by jvernee (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/16451#pullrequestreview-1708353739


More information about the core-libs-dev mailing list