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

java.lang.ClassFormatError: Extra bytes at the end of class file test" possibly violation of JVMS 4.7.1

XMLWordPrintable

    • b20
    • 11
    • b25
    • generic
    • generic

        ADDITIONAL SYSTEM INFORMATION :
        Windows 7,10 and linux in Jdk/Opendk-11-ea+20

        A DESCRIPTION OF THE PROBLEM :
        When a none zero length unrecognized attribute is in a class version 55 for ea+20 it has a LinkageError of:
        Error: LinkageError occurred while loading main class test
                java.lang.ClassFormatError: Extra bytes at the end of class file test

        REGRESSION : Last worked in version 11

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Have a class file marked for version 55 with a none zero length unrecognized attribute (See JVMS 4.7.1)

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The runtime will ignore the unrecognized attribute
        ACTUAL -
        Has a LinkageError:
        Error: LinkageError occurred while loading main class test
                java.lang.ClassFormatError: Extra bytes at the end of class file test

        CUSTOMER SUBMITTED WORKAROUND :
        Compile for JDK 10

        FREQUENCY : always


          1. test.class
            0.2 kB
          2. test.jcod
            2 kB

              hseigel Harold Seigel (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: