RFR: 8353504: CDS archives are not found when JVM is in non-variant location

Aleksey Shipilev shade at openjdk.org
Wed May 21 19:05:51 UTC 2025


On Wed, 21 May 2025 15:54:39 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

> Although this fix reverts part of the change for [JDK-8348028](https://bugs.openjdk.org/browse/JDK-8348028), gtestLauncher still works the way it was described in JDK-8348028.
> Also added a test case to test the default CDS archive can be found from a non-variant location.
> 
> Sanity tested tiers 1 and 2.

Thank you for doing this! I allocated some of my time to handle this in time for JDK 25 as well :)

I am confused about the fix though. Let me see if I get it right: we end up calling `os::jvm_path`, which uses `Abstract_VM_Version::vm_variant()` only when `Arguments::executing_unit_tests()`. Otherwise it asks `dladdr` -> `realpath` from really running `libjvm.so`.

It basically gets us to the state prior to [JDK-8348028](https://bugs.openjdk.org/browse/JDK-8348028), which is good.

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

Marked as reviewed by shade (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25361#pullrequestreview-2858830596


More information about the hotspot-runtime-dev mailing list