git: openjdk/leyden: hermetic-java-runtime: Fix crash with jtreg tests on dynamic JDK:
duke
duke at openjdk.org
Mon Nov 27 20:21:46 UTC 2023
Changeset: afe9ca06
Author: Jiangli Zhou <jianglizhou at google.com>
Date: 2023-07-26 15:48:47 +0000
URL: https://git.openjdk.org/leyden/commit/afe9ca06dd86e8983768de80ba1a08f3c68589b4
Fix crash with jtreg tests on dynamic JDK:
- Add JLI_SetStaticJDK in libjli and set_static_jdk/is_static_jdk in libjvm. JLI_SetStaticJDK is called before loading and creating the JVM. It checks if execution using static build by looking up the hotspot set_static_jdk. set_static_jdk is called if found.
- Fix VM code to use set_static_jdk in a few places. Earlier symbol lookup was used in those cases. However the requested symbols may have been loaded already and the result cannot determine if it's running on static JDK.
- Rename IsStaticJDK back to JLI_IsStaticJDK.
Resolved cherrypick merge conflict.
! src/hotspot/share/classfile/classLoader.cpp
! src/hotspot/share/runtime/java.cpp
! src/hotspot/share/runtime/java.hpp
! src/hotspot/share/runtime/os.cpp
! src/hotspot/share/utilities/zipLibrary.cpp
! src/java.base/share/native/libjli/java.c
! src/java.base/share/native/libjli/java.h
! src/java.base/unix/native/libjli/java_md.c
! src/java.base/unix/native/libjli/java_md.h
More information about the leyden-dev
mailing list