Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232849

[local-methods] VerifyError: Local variable table overflow

XMLWordPrintable

    • generic
    • generic

      The following program compiles fine but results in a verify error upon attempt to run:

      public class X {
          static int x = 42;
      public static void main(String [] args) {
              void xxx (int y) {
                  x+= y;
              }
              int X(int y) {
                  xxx(y);
                  return x;
              }
              System.out.println(X(58));
      }
      }

      Error: LinkageError occurred while loading main class X
      java.lang.VerifyError: Local variable table overflow
      Exception Details:
        Location:
          X.local$main$1(I)I @0: iload_1
        Reason:
          Local index 1 is invalid
        Bytecode:
          0000000: 1bb8 0019 b200 1cac



            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: