JDK-8240254 : Build is broken when cds is disabled after JDK-8236604
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • 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
Relates :  
Relates :  
Relates :  
Description
- Reproduce
```
bash configure --with-jvm-features=-cds ...
make images
```

- Symptom
```
Undefined symbols for architecture x86_64:
  "SystemDictionary::load_shared_class_misc(InstanceKlass*, ClassLoaderData*, Thread*)", referenced from:
      SystemDictionary::quick_resolve(InstanceKlass*, ClassLoaderData*, Handle, Thread*) in systemDictionary.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

- It might be fixed by
```
diff -r f227e770495f src/hotspot/share/classfile/systemDictionary.cpp
--- a/src/hotspot/share/classfile/systemDictionary.cpp  Fri Feb 28 15:30:29 2020 -0800
+++ b/src/hotspot/share/classfile/systemDictionary.cpp  Sat Feb 29 08:42:41 2020 +0800
@@ -1941,7 +1941,9 @@
   }

   klass->restore_unshareable_info(loader_data, domain, THREAD);
+#if INCLUDE_CDS
   load_shared_class_misc(klass, loader_data, CHECK);
+#endif
   Dictionary* dictionary = loader_data->dictionary();
   unsigned int hash = dictionary->compute_hash(klass->name());
   dictionary->add_klass(hash, klass->name(), klass);
```
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/0569a84a9ec0 User: jiefu Date: 2020-02-29 01:39:24 +0000
29-02-2020