You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2021/07/26 14:50:00 UTC

[jira] [Created] (GROOVY-10183) Incorrect SIG_ARRAY_LENGTH=255 at org.codehaus.groovy.classgen.asm.CallSiteWriter

Eric Milles created GROOVY-10183:
------------------------------------

             Summary: Incorrect SIG_ARRAY_LENGTH=255 at org.codehaus.groovy.classgen.asm.CallSiteWriter
                 Key: GROOVY-10183
                 URL: https://issues.apache.org/jira/browse/GROOVY-10183
             Project: Groovy
          Issue Type: Bug
    Affects Versions: 2.5.14
            Reporter: Eric Milles


Original issue: https://github.com/groovy/groovy-eclipse/issues/1285

{quote}
SIG_ARRAY_LENGTH should have been 250 instead of 255 at https://github.com/groovy/groovy-eclipse/blob/master/base/org.codehaus.groovy25/src/org/codehaus/groovy/classgen/asm/CallSiteWriter.java

    private static final int SIG_ARRAY_LENGTH = 255;
Because, the maximum is determined by the maximum number of arguments that can be passed to ArrayUtil.createArray(), which is 250 as can be seen here: http://docs.groovy-lang.org/docs/groovy-2.4.0/html/api/org/codehaus/groovy/runtime/ArrayUtil.html

Currently, any value less than 250 works, over 255 throws IllegalArgumentException, but value between 250-255 continues to fall through and fail in a way that is very difficult to debug (which is what the CL that introduced SIG_ARRAY_LENGTH wanted to avoid).
{quote}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)