Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8215327

[Zero] Zero JVM variant fails to build after JDK-8200613 due to undefined ref to close_jrt_image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • hotspot
    • None
    • other
    • linux

      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 ");

            chrisphi Chris Phillips
            chrisphi Chris Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: