JDK-8240258 : SystemDictionary::quick_resolve need guarded by INCLUDE_CDS
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • Submitted: 2020-02-29
  • Updated: 2020-03-05
  • Resolved: 2020-02-29
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.
JDK 15
15 b13Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
See bug https://bugs.openjdk.java.net/browse/JDK-8240254

This is for the new added quick_resolve function investigation.

diff -r 624d51be7acd src/hotspot/share/classfile/systemDictionary.cpp
--- a/src/hotspot/share/classfile/systemDictionary.cpp	Fri Feb 28 12:49:37 2020 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.cpp	Fri Feb 28 17:53:35 2020 -0800
@@ -1918,6 +1918,7 @@
 }
 #endif

+#if INCLUDE_CDS
 void SystemDictionary::quick_resolve(InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS) {
   assert(!Universe::is_fully_initialized(), "We can make short cuts only during VM initialization");
   assert(klass->is_shared(), "Must be shared class");
@@ -1948,6 +1949,7 @@
   add_to_hierarchy(klass, CHECK);
   assert(klass->is_loaded(), "Must be in at least loaded state");
 }
+#endif

 bool SystemDictionary::resolve_wk_klass(WKID id, TRAPS) {
   assert(id >= (int)FIRST_WKID && id < (int)WKID_LIMIT, "oob");
diff -r 624d51be7acd src/hotspot/share/classfile/systemDictionary.hpp
--- a/src/hotspot/share/classfile/systemDictionary.hpp	Fri Feb 28 12:49:37 2020 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.hpp	Fri Feb 28 17:53:35 2020 -0800
@@ -634,7 +634,7 @@
   // Resolve well-known classes so they can be used like SystemDictionary::String_klass()
   static void resolve_well_known_classes(TRAPS);
   // quick resolve using CDS for well-known classes only.
-  static void quick_resolve(InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS);
+  static void quick_resolve(InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS) NOT_CDS_RETURN;

   // Class loader constraints
   static void check_constraints(unsigned int hash,
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/f46dfe6b18ac User: minqi Date: 2020-02-29 03:30:20 +0000
29-02-2020