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.
======================================================================
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.
======================================================================
- duplicates
-
JDK-4249669 jck failure dasg03402m011 as new javac generates incorrect code
- Closed