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

Build is broken when cds is disabled after JDK-8236604

    Details

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

      Description

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

      - Symptom
      ```
      Undefined symbols for architecture x86_64:
        "SystemDictionary::load_shared_class_misc(InstanceKlass*, ClassLoaderData*, Thread*)", referenced from:
            SystemDictionary::quick_resolve(InstanceKlass*, ClassLoaderData*, Handle, Thread*) in systemDictionary.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      ```

      - It might be fixed by
      ```
      diff -r f227e770495f src/hotspot/share/classfile/systemDictionary.cpp
      --- a/src/hotspot/share/classfile/systemDictionary.cpp Fri Feb 28 15:30:29 2020 -0800
      +++ b/src/hotspot/share/classfile/systemDictionary.cpp Sat Feb 29 08:42:41 2020 +0800
      @@ -1941,7 +1941,9 @@
         }

         klass->restore_unshareable_info(loader_data, domain, THREAD);
      +#if INCLUDE_CDS
         load_shared_class_misc(klass, loader_data, CHECK);
      +#endif
         Dictionary* dictionary = loader_data->dictionary();
         unsigned int hash = dictionary->compute_hash(klass->name());
         dictionary->add_klass(hash, klass->name(), klass);
      ```

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: