Menu

#62 "Invalid opcode 196" exception

closed
5
2014-07-17
2004-09-22
No

Attached test throws the following exception. Please
note that code being compiled is using ASM toolkit from
CVS HEAD. http://asm.objectweb.org/

java.lang.RuntimeException: dump(): Invalid opcode 196
at offset 36720

at net.janino.CodeContext.flowAnalysis\(Unknown Source\)

at net.janino.CodeContext.flowAnalysis\(Unknown Source\)

at net.janino.Java$FunctionDeclarator.compile\(Unknown

Source)

at net.janino.Java$ClassDeclaration.compile\(Unknown

Source)

at net.janino.Java$CompilationUnit.compile\(Unknown Source\)

at net.janino.Java$CompilationUnit.compile\(Unknown Source\)

at

org.objectweb.asm.attrs.JaninoTest.main(JaninoTest.java:5217)

Exception in thread "main"

Discussion

  • Eugene Kuleshov

    Eugene Kuleshov - 2004-09-22
     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-09-29

    Logged In: YES
    user_id=158797

    I guess the problem is related to wide offset (196 opcode)...

     
  • Arno Unkrig

    Arno Unkrig - 2004-10-03
    • status: open --> closed
     
  • Arno Unkrig

    Arno Unkrig - 2004-10-03

    Logged In: YES
    user_id=865893

    I can't reproduce this one... On JRE 1.4, I get stack overflow
    errors due to the 5000+ string concatenations, and on JRE
    1.2.2 I get UTFDataFormatException due to the string
    constant longer than 64K.

    What exactly is your environment? (JANINO version, JDK
    version, etc.)
    I renamed your class to "Bug_1032563" and ran:

    java net.janino.Compiler -verbose -g -rebuild
    Bug_1032563.java

     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-11-15
    • status: closed --> open
     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-11-15

    Logged In: YES
    user_id=158797

    I've picked up Janino 2.0.15 and still can reproduce this bug.

     
  • Arno Unkrig

    Arno Unkrig - 2004-11-15

    Logged In: YES
    user_id=865893

    Hi Eugene,

    again, what is your environment (JDK, OS, etc.)?

     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-11-15

    Logged In: YES
    user_id=158797

    It is windows, JRE 1.4, but issue is totally generic.

    Janino just doesn not handle large offsets properly in large
    methods. est case is already attached to this bug.

     
  • Arno Unkrig

    Arno Unkrig - 2004-11-19
    • status: open --> open-fixed
     
  • Arno Unkrig

    Arno Unkrig - 2004-11-19

    Logged In: YES
    user_id=865893

    JANINO now unrolls the string concatenation properly and
    reduces it to one string constant. That constant, however,
    is larger than 64K and is thus split up into several 64K
    string constants which are concatenated at run-time.

     
  • Arno Unkrig

    Arno Unkrig - 2004-12-06
    • status: open-fixed --> closed-fixed
     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-12-07

    Logged In: YES
    user_id=158797

    It seems that problem is still in 2.0.16. I'll try 2.0.17
    shortly. Let me know if you need more information.

     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-12-07
    • status: closed-fixed --> open-fixed
     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-12-08

    Logged In: YES
    user_id=158797

    Just checked. Bug is in 2.0.17 too. Here is

    Parser p = new Parser(new Scanner(name, new
    StringReader(source)));
    return p.parseCompilationUnit().compile(CL,
    DebuggingInformation.ALL)[0].toByteArray();

    See an attachement for testcase. javac from JDK 1.4 can
    compile it without problem. Source has dependency on ASM
    toolkit ver. 2.0 (built from CVS HEAD).

     
  • Eugene Kuleshov

    Eugene Kuleshov - 2004-12-08

    Source file that Janino failing to compile

     
  • Arno Unkrig

    Arno Unkrig - 2005-01-02
    • status: open-fixed --> closed
     
  • Arno Unkrig

    Arno Unkrig - 2005-01-02

    Logged In: YES
    user_id=865893

    Migrated this ticket to

    http://jira.codehaus.org/browse/JANINO-2

     

Log in to post a comment.

MongoDB Logo MongoDB