JDK-8371507 : [lworld] Suspicious RefArrayKlass creation
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-11-08
  • Updated: 2025-11-10
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
Related Reports
Relates :  
Description
If I add this to lworld, running the compiler tests crashes the VM:

diff --git a/src/hotspot/share/oops/refArrayKlass.cpp b/src/hotspot/share/oops/refArrayKlass.cpp
index ad57b082751..c69898e5343 100644
--- a/src/hotspot/share/oops/refArrayKlass.cpp
+++ b/src/hotspot/share/oops/refArrayKlass.cpp
@@ -62,6 +62,7 @@ RefArrayKlass* RefArrayKlass::allocate_refArray_klass(ClassLoaderData* loader_da
                                        TRAPS) {
   assert(!ArrayKlass::is_null_restricted(props) || (n == 1 && element_klass->is_inline_klass()),
          "null-free unsupported");
+  assert(!ArrayKlass::is_non_atomic(props), "ref arrays cannot be non-atomic");

   // Eagerly allocate the direct array supertype.
   Klass* super_klass = nullptr;
Comments
[~qamai] could you please add the stack trace?
10-11-2025