From 3a7a390030bd81567d636c633f6800607b1c1934 Mon Sep 17 00:00:00 2001 From: Jason Feng Date: Tue, 10 Dec 2024 16:20:32 -0500 Subject: [PATCH] CRIU adds @NotCheckpointSafe for MethodAccessorGenerator.generateName() Signed-off-by: Jason Feng --- closed/GensrcJ9JCL.gmk | 1 + .../internal/reflect/MethodAccessorGenerator.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/closed/GensrcJ9JCL.gmk b/closed/GensrcJ9JCL.gmk index 1f2719fe452..fd7203eb21b 100644 --- a/closed/GensrcJ9JCL.gmk +++ b/closed/GensrcJ9JCL.gmk @@ -50,6 +50,7 @@ $(eval $(call SetupCopyFiles,COPY_OVERLAY_FILES, \ src/java.base/share/classes/java/util/zip/ZipFile.java \ src/java.base/share/classes/jdk/internal/misc/JavaNetInetAddressAccess.java \ src/java.base/share/classes/jdk/internal/ref/PhantomCleanable.java \ + src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java \ src/java.base/share/classes/module-info.java \ src/java.base/share/classes/sun/security/jca/ProviderConfig.java \ src/java.base/share/classes/sun/security/jca/ProviderList.java \ diff --git a/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java b/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java index 9c6825fecac..b6c92acd62e 100644 --- a/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java +++ b/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java @@ -23,11 +23,21 @@ * questions. */ +/* + * =========================================================================== + * (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved + * =========================================================================== + */ + package jdk.internal.reflect; import java.security.AccessController; import java.security.PrivilegedAction; +/*[IF CRIU_SUPPORT]*/ +import openj9.internal.criu.NotCheckpointSafe; +/*[ENDIF] CRIU_SUPPORT */ + /** Generator for sun.reflect.MethodAccessor and sun.reflect.ConstructorAccessor objects using bytecodes to implement reflection. A java.lang.reflect.Method or @@ -747,6 +757,9 @@ private String buildInternalSignature() { return sb.toString(); } + /*[IF CRIU_SUPPORT]*/ + @NotCheckpointSafe + /*[ENDIF] CRIU_SUPPORT */ private static synchronized String generateName(boolean isConstructor, boolean forSerialization) {