Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902358

jcov should be able to instrument class files that have version 57

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • jcov_3.0
    • tools
    • None
    • b07

      java -Djcov.propfile=jcov.properties -jar ${JCOV_HOME}/jcov.jar JREInstr -rt ${JCOV_HOME}/jcov_network_saver.jar JDK13
      fails with:
      SEVERE : Error instrumenting ‘JDK13/jmod_temp/jdk.security.jgss/classes/com/sun/security/sasl/gsskerb/JdkSASL.class’ - skipped
      Exception details: Unsupported class file major version 57

      This issue caused by asm library that does not support CVF > 56
      org.objectweb.asm.ClassReader ::
      ClassReader(
            final byte[] classFileBuffer, final int classFileOffset, final boolean checkClassVersion) {
          b = classFileBuffer;
          // Check the class' major_version. This field is after the magic and minor_version fields, which
          // use 4 and 2 bytes respectively.
          if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V12) {
            throw new IllegalArgumentException(
                "Unsupported class file major version " + readShort(classFileOffset + 6));
          }
      -----
      public interface Opcodes {
        ....
        int V11 = 0 << 16 | 55;
        int V12 = 0 << 16 | 56;
        ...
      }

      The proposed fix is to update asm.

            lkuskov Leonid Kuskov
            lkuskov Leonid Kuskov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: