When running test com/sun/jdi/EATests.java#id0 with the -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=1 , the VM detects an attempt to synchronize on an instance of java.lang.Integer
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (workspace/open/src/hotspot/share/runtime/synchronizer.cpp:485), pid=1260705, tid=1260708
# fatal error: Synchronizing on object 0x00000000ffd7ec58 of klass java.lang.Integer at EARelockingValueBasedTarget.dontinline_testMethod(EATests.java:2295)
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-02-15-2215338.frederic.parain.jdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-02-15-2215338.frederic.parain.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x156e874] ObjectSynchronizer::handle_sync_on_value_based_class(Handle, JavaThread*)+0x904
#
java.lang.Integer is one of the classes to be migrated to be a value class in JEP 401 Preview, which would cause this test to fail even without the DiagnoseSyncOnValueBasedClasses diagnostic option.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (workspace/open/src/hotspot/share/runtime/synchronizer.cpp:485), pid=1260705, tid=1260708
# fatal error: Synchronizing on object 0x00000000ffd7ec58 of klass java.lang.Integer at EARelockingValueBasedTarget.dontinline_testMethod(EATests.java:2295)
#
# JRE version: Java(TM) SE Runtime Environment (23.0) (fastdebug build 23-internal-2024-02-15-2215338.frederic.parain.jdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 23-internal-2024-02-15-2215338.frederic.parain.jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x156e874] ObjectSynchronizer::handle_sync_on_value_based_class(Handle, JavaThread*)+0x904
#
java.lang.Integer is one of the classes to be migrated to be a value class in JEP 401 Preview, which would cause this test to fail even without the DiagnoseSyncOnValueBasedClasses diagnostic option.