JDK-8326605 : [lworld] Compiler test SplitIfSharedFastLockBehindCastPP performs a synchronization on a value based class
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2024-02-23
  • Updated: 2024-02-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
repo-valhallaUnresolved
Description
When running test compiler/loopopts/SplitIfSharedFastLockBehindCastPP with VM options -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=1, the VM detects an attempt to synchronize on an instance of a java.lang.Integer:

#  Internal Error (workspace/open/src/hotspot/share/runtime/synchronizer.cpp:485), pid=4003920, tid=4003946
#  fatal error: Synchronizing on object 0x0000200000037ee8 of klass java.lang.Integer at SplitIfSharedFastLockBehindCastPP.test2(SplitIfSharedFastLockBehindCastPP.java:92)
#
# 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, compressed class ptrs, z 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.