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

Parallel class loading can pass is_superclass true for interfaces

XMLWordPrintable

    • master

      In handle_parallel_super_load, we call resolve to check for CCE passing is_superclass true.
          Klass* superk = SystemDictionary::resolve_with_circularity_detection(name,
                                                                             superclassname,
                                                                             class_loader,
                                                                             protection_domain,
                                                                             true,
                                                                             CHECK);

      Then it calls this with is_superclass true, which then uses this flag to either load super class or interfaces.

            // Special processing for handling UNREGISTERED shared classes.
            InstanceKlass* k = SystemDictionaryShared::lookup_super_for_unregistered_class(class_name,
                                   next_name, is_superclass);

      With is_superclass is true, which does this. which looks wrong:

          if (class_name->equals(parser->current_class_name())) {
            // When this function is called, all the numbered super and interface types
            // must have already been loaded. Hence this function is never recursively called.
            if (is_superclass) {
              return parser->lookup_super_for_current_class(super_name);
            } else {
              return parser->lookup_interface_for_current_class(super_name);
            }

      This issue came about because of [~dholmes] comment at https://github.com/openjdk/jdk/pull/20279#discussion_r1690500292

            coleenp Coleen Phillimore
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: