Verify error at runtime due to incorrect classification of a lambda as being instance capturing

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 9
    • Affects Version/s: 8u40, 9
    • Component/s: tools
    • b71
    • generic
    • generic
    • Verified

        VerifyError (Bad local variable type) occurs on the proper compiled class.

        To reproduce compile and run the attached file.

        Error: A JNI error has occurred, please check your installation and try again
        Exception in thread "main" java.lang.VerifyError: Bad local variable type
        Exception Details:
          Location:
            tmp/Crash.doit()Ljava/lang/Object; @0: aload_0
          Reason:
            Type top (current frame, locals[0]) is not assignable to reference type
          Current Frame:
            bci: @0
            flags: { }
            locals: { }
            stack: { }
          Bytecode:
            0x0000000: 2aba 0003 0000 4b2a 59b3 0004 b0

        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)

              Assignee:
              Srikanth Adayapalam (Inactive)
              Reporter:
              Andrei Eremeev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: