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

dasg03[4-5]02m011.html: bad bytecodes generated - inconsistent stack height

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.0
    • 1.3.0
    • tools
    • beta
    • generic, sparc
    • generic, solaris_2.5.1
    • Verified

      The following new tests have been added to the JCK. When compiled
      with the new compiler, a classfile which contains bad bytecodes is
      generated. Since this problem was not observed in jdk1.2, the new
      behaviour represents a regression.

      lang/DASG/dasg034/dasg03402m011/dasg03402m011.html
      lang/DASG/dasg035/dasg03502m011/dasg03502m011.html

      Both tests contain the following structure which causes the program to
      fail to verify.

      FILE: InconsistentStackHeight.java

      public class InconsistStackHeight {
          public static void main(String argv[]) {
      boolean t = true, f = false;

      boolean b1, r;
      if ( true || (b1 = t) ? true && (b1 = f) : f ) {
      r = b1;
      }
          }
      }

      OUTPUT:

      $ java -fullversion
      java full version "JDK-1.3-D"
      $ java InconsistStackHeight
      Exception in thread "main" java.lang.VerifyError: (class: InconsistStackHeight, method: main signature: ([Ljava/lang/String;)V) Inconsistent stack height 0 != 1

      iris.garcia@eng 1999-05-21


      Name: ssC76496 Date: 07/27/99


      java.lang.VerifyError does not occur in JDK1.3-L build.
      ###@###.###, 28 July 99.
      ======================================================================

            wmaddoxsunw William Maddox (Inactive)
            iris Iris Clark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: