Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2816

Invalid method code length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.6-beta-1
    • 1.6-beta-2
    • None
    • None
    • Windows XP
      java version "1.6.0_02"

    Description

      I decided to get an early jump on testing our application with the new 1.6 beta (and I was very curious about the speed improvements). It turns out I cannot deploy after upgrading to the 1.6-beta-1 version. All my groovy classes compiled fine previously, however now some of them fail with an exception like:

      Caught: java.lang.ClassFormatError: Invalid method Code length 68630 in class file big

      For example, I have attached file called big.groovy file which just returns a very large array (about 1900 or so integers). Using groovy.bat, this class works fine under 1.5.4, but fails with the ClassFormatError under 1.6-beta-1.

      Even more interesting is the size of the class file. Using groovyc, compare the sizes of the produced class files:

      Size of class file for 1.6-beta: 183,924
      Size of class file for 1.5.4: 42,105

      So there is roughly a 4 times increase in size of the produced class. I assume that has to do with the optimizations, right? Or is it something else?

      Attachments

        1. big.groovy
          13 kB
          Chuck May
        2. groovy2816_additonal.patch
          1.0 kB
          Chanwit Kaewkasi

        Issue Links

          Activity

            People

              ait Alex Tkachman
              cmay4 Chuck May
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: