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

Add support in JVM TI, JDI, and Instrumentation for hidden classes

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P2
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 15
    • Component/s: hotspot

      Description

      From JVM's point of view, a hidden class is a normal class except the following:

         1. A hidden class has no initiating class loader and is not registered in any dictionary.
         2. A hidden class has a name containing an illegal character
            `Class::getName` returns `p.Foo/0x1234` whereas `GetClassSignature` returns "Lp/Foo.0x1234;".
         3. A hidden class is not modifiable, i.e. cannot be redefined or retransformed.
            JVM TI (IsModifableClass)[https://download.java.net/java/early_access/jdk15/docs/specs/jvmti.html#IsModifiableClass] returns false on a hidden class and VM anonymous class.

      VM anonymous class vs Hidden class

         - VM anonymous class is not registered in any dictionary and is also not modifiable.
         - There is no specification for VM anonymous class and hence never specified
           it has or does not have an initiating loader.
         - GetClassSignature returns "Lp/Foo/0x1234;" on a VM anonymous class with no illegal character
           whereas GetClassSignature returns "Lp/Foo.0x1234;" for a hidden class.
           VM anonymous class might be incorrectly interpreted as a normal class and
           `p.Foo` as the package name.

      The proposal is that hidden classes are deemed as "loaded" classes, i.e. essentially all derived classes. Hidden classes are not "treated" specially.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sspitsyn Serguei Spitsyn
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: