[lworld] RFR: 8368274: [lworld] Unsafe.compareAndExchangeFlatValue() wrongly assumes padding bytes are the same for identical value objects

Chen Liang liach at openjdk.org
Mon Dec 8 17:02:15 UTC 2025


Use the raw value get as witness, because the flat value get may ignore garbage value and cause infinite loop as a result. Waiting for a test case.

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

Commit messages:
 - A test
 - Merge branch 'lworld' of https://github.com/openjdk/valhalla into fix/unsafe-flat-cas
 - Merge branch 'lworld' of https://github.com/openjdk/valhalla into fix/unsafe-flat-cas
 - Attempt to fix garbage cas

Changes: https://git.openjdk.org/valhalla/pull/1734/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=1734&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8368274
  Stats: 182 lines in 2 files changed: 144 ins; 15 del; 23 mod
  Patch: https://git.openjdk.org/valhalla/pull/1734.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1734/head:pull/1734

PR: https://git.openjdk.org/valhalla/pull/1734


More information about the valhalla-dev mailing list