Commit 6b6118cd authored by Eric Bruneton's avatar Eric Bruneton

Add failing test showing the issue.

parent 6ec95968
......@@ -211,4 +211,11 @@ public class AllFrames {
public static Object m21(boolean b) {
return b ? new Integer(1) : null;
}
// Frame AALOAD from null array (no frame in original class because ASM can't compute the exact
// same frame as javac, but usefull for tests that compute frame types at each instruction).
public static int m23() {
Integer[] array = null;
return array[0].intValue();
}
}
......@@ -105,7 +105,7 @@ public class jdk8/AllFrames {
// parameter p
// parameter q
L0
LINENUMBER 63 L0
LINENUMBER 73 L0
ILOAD 1
IFEQ L1
ALOAD 0
......@@ -137,7 +137,7 @@ public class jdk8/AllFrames {
ALOAD 12
ALOAD 13
L4
LINENUMBER 64 L4
LINENUMBER 74 L4
INVOKEVIRTUAL jdk8/AllFrames.m0 (ZBCSIFJDLjava/lang/Object;[Ljava/lang/Object;[[Ljava/lang/Object;)I
GOTO L5
L1
......@@ -171,10 +171,10 @@ public class jdk8/AllFrames {
ALOAD 12
ALOAD 13
L8
LINENUMBER 65 L8
LINENUMBER 75 L8
INVOKEVIRTUAL jdk8/AllFrames.m0 (ZBCSIFJDLjava/lang/Object;[Ljava/lang/Object;[[Ljava/lang/Object;)I
L5
LINENUMBER 63 L5
LINENUMBER 73 L5
FRAME SAME1 I
IRETURN
L9
......@@ -199,7 +199,7 @@ public class jdk8/AllFrames {
// parameter b
TRYCATCHBLOCK L0 L1 L2 java/io/UnsupportedEncodingException
L0
LINENUMBER 70 L0
LINENUMBER 81 L0
ALOAD 1
IFNONNULL L3
ACONST_NULL
......@@ -223,11 +223,11 @@ public class jdk8/AllFrames {
FRAME SAME1 java/lang/String
ARETURN
L2
LINENUMBER 71 L2
LINENUMBER 82 L2
FRAME SAME1 java/io/UnsupportedEncodingException
ASTORE 3
L6
LINENUMBER 72 L6
LINENUMBER 83 L6
ACONST_NULL
ARETURN
L7
......@@ -243,20 +243,20 @@ public class jdk8/AllFrames {
// parameter i
// parameter j
L0
LINENUMBER 80 L0
LINENUMBER 91 L0
ILOAD 2
ISTORE 4
L1
LINENUMBER 81 L1
LINENUMBER 92 L1
ILOAD 1
IFGE L2
L3
LINENUMBER 82 L3
LINENUMBER 93 L3
ILOAD 1
INEG
ISTORE 1
L2
LINENUMBER 84 L2
LINENUMBER 95 L2
FRAME APPEND [T I]
RETURN
L4
......@@ -272,19 +272,19 @@ public class jdk8/AllFrames {
// parameter n
// parameter b
L0
LINENUMBER 88 L0
LINENUMBER 99 L0
LCONST_0
LSTORE 3
L1
LINENUMBER 89 L1
LINENUMBER 100 L1
ILOAD 2
IFEQ L2
L3
LINENUMBER 90 L3
LINENUMBER 101 L3
ICONST_0
ISTORE 5
L4
LINENUMBER 92 L4
LINENUMBER 103 L4
FRAME APPEND [J I]
LLOAD 3
ILOAD 5
......@@ -293,20 +293,20 @@ public class jdk8/AllFrames {
LADD
LSTORE 3
L5
LINENUMBER 93 L5
LINENUMBER 104 L5
ILOAD 5
ILOAD 1
IF_ICMPLT L4
L6
LINENUMBER 94 L6
LINENUMBER 105 L6
GOTO L7
L2
LINENUMBER 95 L2
LINENUMBER 106 L2
FRAME CHOP 1
LCONST_0
LSTORE 5
L8
LINENUMBER 97 L8
LINENUMBER 108 L8
FRAME APPEND [J]
LLOAD 3
LLOAD 5
......@@ -317,14 +317,14 @@ public class jdk8/AllFrames {
LADD
LSTORE 3
L9
LINENUMBER 98 L9
LINENUMBER 109 L9
LLOAD 5
ILOAD 1
I2L
LCMP
IFLT L8
L7
LINENUMBER 100 L7
LINENUMBER 111 L7
FRAME CHOP 1
LLOAD 3
LRETURN
......@@ -342,11 +342,11 @@ public class jdk8/AllFrames {
public m3(I)I
// parameter i
L0
LINENUMBER 105 L0
LINENUMBER 116 L0
ILOAD 1
IFGE L1
L2
LINENUMBER 106 L2
LINENUMBER 117 L2
ILOAD 1
ILOAD 1
IADD
......@@ -380,7 +380,7 @@ public class jdk8/AllFrames {
IADD
ISTORE 1
L3
LINENUMBER 107 L3
LINENUMBER 118 L3
ILOAD 1
ILOAD 1
IADD
......@@ -414,7 +414,7 @@ public class jdk8/AllFrames {
IADD
ISTORE 1
L1
LINENUMBER 109 L1
LINENUMBER 120 L1
FRAME SAME
ILOAD 1
IRETURN
......@@ -428,7 +428,7 @@ public class jdk8/AllFrames {
public m4(I)V
// parameter i
L0
LINENUMBER 114 L0
LINENUMBER 125 L0
ILOAD 1
ILOAD 1
IADD
......@@ -462,7 +462,7 @@ public class jdk8/AllFrames {
IADD
ISTORE 1
L1
LINENUMBER 115 L1
LINENUMBER 126 L1
ILOAD 1
ILOAD 1
IADD
......@@ -496,7 +496,7 @@ public class jdk8/AllFrames {
IADD
ISTORE 1
L2
LINENUMBER 116 L2
LINENUMBER 127 L2
ALOAD 0
ILOAD 1
IFNE L3
......@@ -509,7 +509,7 @@ public class jdk8/AllFrames {
FRAME FULL [jdk8/AllFrames I] [jdk8/AllFrames java/lang/String]
PUTFIELD jdk8/AllFrames.s : Ljava/lang/String;
L5
LINENUMBER 117 L5
LINENUMBER 128 L5
RETURN
L6
LOCALVARIABLE this Ljdk8/AllFrames; L0 L6 0
......@@ -521,7 +521,7 @@ public class jdk8/AllFrames {
public static m5(Z)Ljava/lang/Number;
// parameter b
L0
LINENUMBER 121 L0
LINENUMBER 132 L0
ILOAD 0
IFEQ L1
NEW java/lang/Integer
......@@ -551,7 +551,7 @@ public class jdk8/AllFrames {
public static m6(Z)[Ljava/lang/Number;
// parameter b
L0
LINENUMBER 126 L0
LINENUMBER 137 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -573,7 +573,7 @@ public class jdk8/AllFrames {
public static m7(Z)[[Ljava/lang/Number;
// parameter b
L0
LINENUMBER 131 L0
LINENUMBER 142 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -597,7 +597,7 @@ public class jdk8/AllFrames {
public static m8(Z)[Ljava/lang/Object;
// parameter b
L0
LINENUMBER 136 L0
LINENUMBER 147 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -623,7 +623,7 @@ public class jdk8/AllFrames {
public static m9(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 141 L0
LINENUMBER 152 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -645,7 +645,7 @@ public class jdk8/AllFrames {
public static m10(Z)[Ljava/lang/Object;
// parameter b
L0
LINENUMBER 146 L0
LINENUMBER 157 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -670,7 +670,7 @@ public class jdk8/AllFrames {
public static m11(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 151 L0
LINENUMBER 162 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -693,7 +693,7 @@ public class jdk8/AllFrames {
public static m12(Z)[Ljava/lang/Object;
// parameter b
L0
LINENUMBER 156 L0
LINENUMBER 167 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -716,7 +716,7 @@ public class jdk8/AllFrames {
public static m13(Z)[Ljava/lang/Object;
// parameter b
L0
LINENUMBER 161 L0
LINENUMBER 172 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -743,7 +743,7 @@ public class jdk8/AllFrames {
public static m14(Z)[[Ljava/lang/Object;
// parameter b
L0
LINENUMBER 166 L0
LINENUMBER 177 L0
ILOAD 0
IFEQ L1
ICONST_1
......@@ -772,7 +772,7 @@ public class jdk8/AllFrames {
public static m15(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 171 L0
LINENUMBER 182 L0
ILOAD 0
IFEQ L1
NEW java/lang/Integer
......@@ -796,7 +796,7 @@ public class jdk8/AllFrames {
public static m16(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 176 L0
LINENUMBER 187 L0
ILOAD 0
IFEQ L1
NEW java/lang/Integer
......@@ -820,7 +820,7 @@ public class jdk8/AllFrames {
public m17(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 181 L0
LINENUMBER 192 L0
ILOAD 1
IFEQ L1
ICONST_0
......@@ -843,7 +843,7 @@ public class jdk8/AllFrames {
public m18(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 186 L0
LINENUMBER 197 L0
ILOAD 1
IFEQ L1
ICONST_0
......@@ -866,7 +866,7 @@ public class jdk8/AllFrames {
public m19(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 191 L0
LINENUMBER 202 L0
ILOAD 1
IFEQ L1
ICONST_0
......@@ -889,7 +889,7 @@ public class jdk8/AllFrames {
public static m20(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 196 L0
LINENUMBER 207 L0
ILOAD 0
IFEQ L1
ACONST_NULL
......@@ -912,7 +912,7 @@ public class jdk8/AllFrames {
public static m21(Z)Ljava/lang/Object;
// parameter b
L0
LINENUMBER 201 L0
LINENUMBER 212 L0
ILOAD 0
IFEQ L1
NEW java/lang/Integer
......@@ -930,4 +930,22 @@ public class jdk8/AllFrames {
LOCALVARIABLE b Z L0 L3 0
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x9
public static m23()I
L0
LINENUMBER 218 L0
ACONST_NULL
ASTORE 0
L1
LINENUMBER 219 L1
ALOAD 0
ICONST_0
AALOAD
INVOKEVIRTUAL java/lang/Integer.intValue ()I
IRETURN
L2
LOCALVARIABLE array [Ljava/lang/Integer; L1 L2 0
MAXSTACK = 2
MAXLOCALS = 1
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment