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

Build is broken when cds is disabled after JDK-8232081

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 15
    • None
    • hotspot
    • b14

      - Reproduce
      ```
      bash configure --with-jvm-features=-cds ...
      make images
      ```

      - Symptom
      ```
      Undefined symbols for architecture x86_64:
        "MetaspaceShared::link_and_cleanup_shared_classes(Thread*)", referenced from:
            _JVM_BeforeHalt in jvm.o
            JavaThread::invoke_shutdown_hooks() in thread.o
      ```

      - It might be fixed by
      ```
      diff -r ba031902229b src/hotspot/share/memory/metaspaceShared.hpp
      --- a/src/hotspot/share/memory/metaspaceShared.hpp Fri Mar 06 18:42:13 2020 -0500
      +++ b/src/hotspot/share/memory/metaspaceShared.hpp Sat Mar 07 08:25:01 2020 +0800
      @@ -296,7 +296,7 @@
         }
       
         static bool try_link_class(InstanceKlass* ik, TRAPS);
      - static void link_and_cleanup_shared_classes(TRAPS);
      + static void link_and_cleanup_shared_classes(TRAPS) NOT_CDS_RETURN;
       
       #if INCLUDE_CDS
         static ReservedSpace reserve_shared_space(size_t size, char* requested_address = NULL);
      ```

            jiefu Jie Fu
            jiefu Jie Fu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: