Some hidden classes are not archived for ArchiveInvokeDynamic

XMLWordPrintable

      When running with Leyden "new workflow" for a program like this:

      ========
      class TestApp {
          static String concat23String() {
              return f0 + ","+ f1 + ","+ f2 + ","+ f3 + ","+ f4 + ","+ f5 + ","+ f6 + ","+ f7 + ","+ f8 + ","+ f9 + ","
                      + f10 + ","+ f11 + ","+ f12 + ","+ f13 + ","+ f14 + ","+ f15 + ","+ f16 + ","+ f17 + ","+ f18 + ","+ f19 + ","
                      + f20 + ","+ f21 + ","+ f22;
          }

          private static String
                  f0="1", f1="1", f2="1", f3="1", f4="1", f5="1", f6="1", f7="1", f8="1", f9="1",
                  f10="1", f11="1", f12="1", f13="1", f14="1", f15="1", f16="1", f17="1", f18="1", f19="1",
                  f20="1", f21="1", f22="1";
          ...
      }
      =========

      The following hidden class is referenced from the ConstantPool::resolved_references() of the TestApp class

      TestApp$$StringConcat/0x800000006

      However, this hidden class is incorrectly excluded during SystemDictionaryShared::check_for_exclusion(). As a result, the dumping fails.

      ===========
      The fix is to recursively scan all ConstantPool::resolved_references(), as well as all ArchivableStaticFieldInfo in heapShared.cpp. We mark all the hidden classes that we can find as "required", so that they are not excluded from the CDS image.

            Assignee:
            Ioi Lam
            Reporter:
            Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: