Defaulting to class file version of 52.0 when compiling jasm leads to several test failures in the JDK

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • jtreg8.2
    • Affects Version/s: jtreg8.2
    • Component/s: tools
    • None

      In jtreg mainline repo, we recently integrated CODETOOLS-7904122. That change was done to prevent a warning message that jasm compilation writes out if the jasm file being compiled doesn't explicitly contain a class file version. The warning looked like:

      > mexit02a.jasm (24:19) Warning: Class file version not specified in file or by -cv parameter. Defaulting to version "45:3"

      In the fix for CODETOOLS-7904122, in order to prevent this warning, in jtreg we explicitly passed the class file version to use if none is specified in the jasm file being compiled. We decided to use 52.0 (Java 8) as the default version to compile these jasm files.

      It turns out that the JDK repo has several jasm files without explicit class file versions and those when compiled with 52.0 version cause test failures because for this version of the bytecode, the classfile verifier expects stackmap table. These jasm files have none.

      To address this, jtreg should explicitly pass -cv value of 45.3 (the version that asmtools would have defaulted to), to prevent this failure as well as to prevent the warning from jasm if no -cv is passed.

            Assignee:
            Jaikiran Pai
            Reporter:
            Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: