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

Details

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

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: