'while' statement with 'test' using var before being declared in body results in VerifyError

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: core-libs
    • None
    • b110
    • generic
    • generic

      function f() {
         while (x += 2) { var x = 44 }
      }
       
      Exception in thread "main" java.lang.VerifyError: get long/double overflows locals
      Exception Details:
        Location:
          jdk/nashorn/internal/scripts/Script$test.f(Ljava/lang/Object;)Ljava/lang/Object; @7: dload_2
        Reason:
          Local index 2 is invalid
        Bytecode:
          0000000: a700 0714 002a 4928 1400 2c63 5c49 b800
          0000010: 339a fff2 b200 37b0
        Stackmap Table:
          append_frame(@3,Top,Double)
          chop_frame(@7,2)

            Assignee:
            Sundararajan Athijegannathan
            Reporter:
            Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: