ClassFile API runs into StackOverflowError while parsing certain class' bytes

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 21
    • Component/s: core-libs
    • None

      An out-of-spec class file can contain circular references which cause SOE, as seen with the "--validate" option of the jar tool.

      % jar --version
      jar 22.0.1
      % jar --validate --file=SOE.jar
      java.lang.StackOverflowError
      ..
      at java.base/jdk.internal.classfile.impl.ClassReaderImpl.readEntry(ClassReaderImpl.java:390)
      at java.base/jdk.internal.classfile.impl.ClassReaderImpl.readClassEntry(ClassReaderImpl.java:431)

        1. Test_Java22.java
          0.3 kB
        2. Test_Java21.java
          0.3 kB
        3. SOE.jar
          0.5 kB
        4. SOE_1.class
          0.1 kB

            Assignee:
            Adam Sotona
            Reporter:
            Marc Schönefeld
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: