RFR: 8337978: Verify OopHandles oops on access

Aleksey Shipilev shade at openjdk.org
Fri Jan 10 17:38:55 UTC 2025


Detecting failures like [JDK-8337941](https://bugs.openjdk.org/browse/JDK-8337941) would be more convenient if we verified the oops we put/get to/from `OopHandles`-s explicitly. This will stop the leakage of incorrect oops (e.g. bad Java klass mirrors seen in [JDK-8337941](https://bugs.openjdk.org/browse/JDK-8337941)) to the runtime.

I was curious how this affects testing time, and I cannot see a big difference at least on `tier1`:


# Baseline
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  60427.40s user 4604.67s system 3775% cpu 28:42.39 total
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  61364.50s user 4563.23s system 3806% cpu 28:52.20 total
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  60192.57s user 4610.89s system 3788% cpu 28:30.51 total

# With OopHandle verification
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  60410.88s user 4601.52s system 3740% cpu 28:58.20 total
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  60389.57s user 4572.23s system 3752% cpu 28:50.96 total
CONF=linux-aarch64-server-fastdebug make test TEST=tier1  60845.41s user 4578.50s system 3757% cpu 29:01.08 total


Additional testing:
 - [x] Linux AArch64 server fastdebug, `tier1`
 - [ ] Linux AArch64 server fastdebug, `all`
 - [ ] Linux x86_64 server fastdebug, `all`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.org/jdk/pull/23043/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23043&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8337978
  Stats: 24 lines in 1 file changed: 20 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/23043.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23043/head:pull/23043

PR: https://git.openjdk.org/jdk/pull/23043


More information about the hotspot-dev mailing list