jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-4337

Generated createCallSiteArray is too big for JVM

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.6.9
  • Fix Version/s: 1.6.8, 1.7.5, 1.8-beta-2
  • Component/s: class generator
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

We are using groovy as a DSL engine and we have a script that is 4000 lines long. We've split it up into several methods, but we still receive an error about 'Invalid method Code length 66090 in class file script1280242156093619159538'. I analyzed the generated code and the issue is that the groovy generated method $createCallSiteArray is too big. This is happening because we have over 8000 entries in our call site array. I've implemented a fix where the initialization of the String array for the callsite array is split up over several methods if it would generate code that is too big. (Patch attached) In our preliminary testing, this has resolved our issue.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Text File
    groovy-1.6.9-invalidmethodcodelength-fix.patch
    28/Jul/10 11:41 AM
    4 kB
    Tom Schneider
  2. Text File
    groovy-1.7.x-invalidmethodcodelength-fix.patch
    01/Sep/10 9:16 AM
    4 kB
    Tom Schneider
  3. Text File
    groovy-trunk-invalidmethodcodelength-fix.patch
    01/Sep/10 9:17 AM
    4 kB
    Tom Schneider

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Guillaume Laforge added a comment - 01/Sep/10 2:44 AM

Could you also provide the same patch for Groovy 1.7/1.8?
Or aren't 1.7/1.8 not affected by this?

Show
Guillaume Laforge added a comment - 01/Sep/10 2:44 AM Could you also provide the same patch for Groovy 1.7/1.8? Or aren't 1.7/1.8 not affected by this?
Hide
Permalink
Tom Schneider added a comment - 01/Sep/10 9:16 AM

Fix for 1.7.x branch.

Show
Tom Schneider added a comment - 01/Sep/10 9:16 AM Fix for 1.7.x branch.
Hide
Permalink
Tom Schneider added a comment - 01/Sep/10 9:17 AM

Fix for trunk.

Show
Tom Schneider added a comment - 01/Sep/10 9:17 AM Fix for trunk.
Hide
Permalink
Tom Schneider added a comment - 01/Sep/10 9:20 AM

Definitely still an issue for trunk and 1.7. That's the first thing I checked when I ran across this issue. I've attached patches for both 1.7/trunk.

Show
Tom Schneider added a comment - 01/Sep/10 9:20 AM Definitely still an issue for trunk and 1.7. That's the first thing I checked when I ran across this issue. I've attached patches for both 1.7/trunk.
Hide
Permalink
Guillaume Laforge added a comment - 01/Sep/10 10:45 AM

I've committed those changes on all the branches.
We don't plan to do an 1.6.x release though, but we can potentially build a snapshot if really needed.
So prefer 1.7.
Thanks a lot for the contribution!

Show
Guillaume Laforge added a comment - 01/Sep/10 10:45 AM I've committed those changes on all the branches. We don't plan to do an 1.6.x release though, but we can potentially build a snapshot if really needed. So prefer 1.7. Thanks a lot for the contribution!
Hide
Permalink
Tom Schneider added a comment - 01/Sep/10 11:14 AM

Great! Thanks for applying the patches. We already have our own version of 1.6 with this fix., so we'll probably look at upgrading to 1.7.

Show
Tom Schneider added a comment - 01/Sep/10 11:14 AM Great! Thanks for applying the patches. We already have our own version of 1.6 with this fix., so we'll probably look at upgrading to 1.7.

People

  • Assignee:
    Guillaume Laforge
    Reporter:
    Tom Schneider
Vote (0)
Watch (1)

Dates

  • Created:
    28/Jul/10 11:41 AM
    Updated:
    15/Dec/10 10:19 PM
    Resolved:
    01/Sep/10 10:45 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.