RFR: 7904033: jcstress: Upgrade Unsafe tests to use VarHandles

Aleksey Shipilev shade at openjdk.org
Tue Jun 17 10:45:55 UTC 2025


With Unsafe being deprecated, we need to rewrite some of the tests to VarHandles.

Public samples and fences tests have been rewritten to VarHandles. VarHandle fences are simple wrappers over Unsafe, we expect no surprises. Other tests were copied and reimplemented with VarHandles to still have more coverage for Unsafe paths, until Unsafe is completely removed.

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

Commit messages:
 - Drop unneccessary imports
 - Fixed

Changes: https://git.openjdk.org/jcstress/pull/166/files
  Webrev: https://webrevs.openjdk.org/?repo=jcstress&pr=166&range=00
  Issue: https://bugs.openjdk.org/browse/CODETOOLS-7904033
  Stats: 1022 lines in 24 files changed: 799 ins; 183 del; 40 mod
  Patch: https://git.openjdk.org/jcstress/pull/166.diff
  Fetch: git fetch https://git.openjdk.org/jcstress.git pull/166/head:pull/166

PR: https://git.openjdk.org/jcstress/pull/166


More information about the jcstress-dev mailing list