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

"java.lang.VerifyError: Bad type on operand stack" is thrown at runtime

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Cannot Reproduce
    • Affects Version/s: 8, 8-repo-lambda
    • Fix Version/s: None
    • Component/s: hotspot
    • Environment:

      Windows 7 x64

    • Subcomponent:
    • Introduced In Build:
      b66
    • Introduced In Version:
      8
    • Resolved In Build:
      b83
    • CPU:
      x86
    • OS:
      windows_7

      Description

      The attached code throws java.lang.VerifyError exception. The output is as follows:

      Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
      Exception Details:
        Location:
          Factory3.create(LMyClass;)LFactory3; @13: invokedynamic
        Reason:
          Type 'MyClass' (current frame, stack[3]) is not assignable to 'Factory3'
        Current Frame:
          bci: @13
          flags: { }
          locals: { 'MyClass' }
          stack: { uninitialized 0, uninitialized 0, 'MyClass2', 'MyClass' }
        Bytecode:
          0000000: bb00 0159 bb00 0259 2ab7 0003 2aba 0004
          0000010: 0000 b700 05b0

      at VmIssue$1.lambda$0(VmIssue.java:6)
      at VmIssue$1$$Lambda$2.myCreate(Unknown Source)
      at VmIssue.lambda$1(VmIssue.java:9)
      at VmIssue$$Lambda$1.add(Unknown Source)
      at VmIssue$1.create(VmIssue.java:6)
      at VmIssue.main(VmIssue.java:8)

      The problem is reproduced on:
      - JDK 8 builds 66, 68;
      - JDK lambda repo, build 68;

      The tests are not in the repo yet but they will fail.

        Attachments

          Activity

            People

            Assignee:
            hseigel Harold Seigel
            Reporter:
            grakov Georgiy Rakov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: