On Wed, 1 Nov 2023 14:10:10 GMT, Maurizio Cimadamore <mcimadam...@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. This pull request has now been integrated. Changeset: f262f06c Author: Maurizio Cimadamore <mcimadam...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/f262f06c97b9ea94cd6119b3a8beb16bf804d083 Stats: 42 lines in 4 files changed: 5 ins; 0 del; 37 mod 8319211: Regression in LoopOverNonConstantFP Reviewed-by: jvernee ------------- PR: https://git.openjdk.org/jdk/pull/16451