JDK-8215327 : [Zero] Zero JVM variant fails to build after JDK-8200613 due to undefined ref to close_jrt_image
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: other
  • Submitted: 2018-12-13
  • Updated: 2018-12-13
  • Resolved: 2018-12-13
Related Reports
Duplicate :  
Description
Via Magnus Ihse Bursie 
The following build error when building zero in jdk/jdk:

workspace/build/linux-x64-zero/hotspot/variant-zero/libjvm/objs/os_linux.o: In function `os::abort(bool, void*, void const*)':
workspace/open/src/hotspot/os/linux/os_linux.cpp:1358: undefined reference to `ClassLoader::close_jrt_image()'
collect2: error: ld returned 1 exit status
lib/CompileJvm.gmk:172: recipe for target 'workspace/build/linux-x64-zero/support/modules_libs/java.base/server/libjvm.so' failed

The implementation of close_jrt_image is ifdef'd off for zero, but the call
is unguarded.  

Suggested fix: 
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -1354,9 +1354,11 @@
 void os::abort(bool dump_core, void* siginfo, const void* context) {
   os::shutdown();
   if (dump_core) {
+#ifndef ZERO
     if (UseSharedSpaces && DumpPrivateMappingsInCore) {
       ClassLoader::close_jrt_image();
     }
+#endif
 #ifndef PRODUCT
     fdStream out(defaultStream::output_fd());
     out.print_raw("Current thread is ");

Comments
Bug creation overlap...
13-12-2018