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

Build is broken when cds is disabled after JDK-8232081

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b14

      Description

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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: