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

Shared array class should not always be loaded in boot loader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • 21
    • hotspot
    • b13

      We currently always load the shared array classes in the boot loader:

      https://github.com/openjdk/jdk/blob/939344b8433b32166f42ad73ae3d96e84b033478/src/hotspot/share/oops/instanceKlass.cpp#L2689

          array_klasses()->restore_unshareable_info(ClassLoaderData::the_null_class_loader_data(), Handle(), CHECK);

      This is incorrect. The obj array classes should be in the same loader that defines the ObjArrayKlass::_bottom_klass.

      Currently, this bug is not causing problems because:
      - for the static archive, we only archive object array classes from the boot loader
      - for the dynamic archive, we don't archive any object array classes

      However, we should fix this bug in preparation for future development, where we may need to archive archive object array classes for any loaders.

            ccheung Calvin Cheung
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: