From cc3b75fee9e6e96612c749b69d878091699c2b3a Mon Sep 17 00:00:00 2001 From: Jason Feng Date: Fri, 4 Oct 2024 11:36:09 -0400 Subject: [PATCH] CRIU adds @NotCheckpointSafe at ClassLoader.getClassLoadingLock() Signed-off-by: Jason Feng --- jcl/src/java.base/share/classes/java/lang/ClassLoader.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jcl/src/java.base/share/classes/java/lang/ClassLoader.java b/jcl/src/java.base/share/classes/java/lang/ClassLoader.java index e96b9a43407..c8f8ab46994 100644 --- a/jcl/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/jcl/src/java.base/share/classes/java/lang/ClassLoader.java @@ -72,6 +72,10 @@ import jdk.internal.reflect.CallerSensitiveAdapter; /*[ENDIF] JAVA_SPEC_VERSION >= 18 */ +/*[IF CRIU_SUPPORT]*/ +import openj9.internal.criu.NotCheckpointSafe; +/*[ENDIF] CRIU_SUPPORT*/ + /** * ClassLoaders are used to dynamically load, link and install * classes into a running image. @@ -1460,6 +1464,9 @@ private static boolean registerAsParallelCapable(Class callerCls) { * @see java.lang.ClassLoader * */ +/*[IF CRIU_SUPPORT]*/ +@NotCheckpointSafe +/*[ENDIF] CRIU_SUPPORT */ protected Object getClassLoadingLock(final String className) { Object lock = this; if (isParallelCapable) {