RFR: 8337978: Verify OopHandles oops on access

David Holmes dholmes at openjdk.org
Mon Jan 13 02:45:36 UTC 2025


On Fri, 10 Jan 2025 17:32:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> 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`

Seems reasonable.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23043#pullrequestreview-2545619370


More information about the hotspot-dev mailing list