Skip to content

Janino throws runtime excetion for a method with more than 254 of operand stack height #1

@kiszk

Description

@kiszk

This is the same as issue #6 in the old repository

When we pass the following code piece to Janino, Janino throws the following exception because the max height of Java operand stack for foo() is more than 254.
This issue was revealed by the JIRA entry

Program

double test(double d0, double d1, ..., double d126) { return 1.0D; }

double foo() {
  boolean b = false 
  double d = b ? 0.0D : test(0, 0, .... 0);  // @kiszk corrected this line on July 1, 2016
  return d;
}

Exception

org.codehaus.janino.JaninoRuntimeException: org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificSafeProjection.apply(java.lang.Object _i): Operand stack overflow at offset ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions