77 // Test that a withfield opcode with an out of bounds cp index causes a VerifyError.
78 runTestVerifyError("wthFldBadCP", "Illegal constant pool index");
79
80 // Test that VerifyError is thrown if the first operand on the stack is not assignable
81 // to withfield's field.
82 runTestVerifyError("wthFldBadFldVal", "Bad type on operand stack");
83
84 // Test that VerifyError is thrown if the second operand on the stack is a primitive.
85 runTestVerifyError("wthFldBadFldRef", "Bad type on operand stack");
86
87 // Test that ClassFormatError is thrown for a class file, with major version 54, that
88 // contains a withfield opcode.
89 runTestFormatError("wthFldBadMajorVersion", "withfield not supported by this class file version");
90
91 // Test VerifyError is thrown if a withfields's cp entry is not a field.
92 runTestVerifyError("wthFldWrongCPType", "Illegal type at constant pool entry");
93
94 // Test that VerifyError is thrown if the class for a withfields's cp fieldref
95 // entry is java.lang.Object and the reference on the stack is an inline type.
96 runTestVerifyError("wthFldObject", "must be identical inline types");
97 */
98 // Test VerifyError is thrown if a monitorenter's cp entry is an inline type.
99 runTestVerifyError("monEnterVT", "Bad type on operand stack");
100
101 // Test VerifyError is thrown if a defaultvalue's cp entry is an inline type.
102 runTestVerifyError("defValueObj", "Illegal type at constant pool entry 4");
103
104 // Test VerifyError is thrown if a withfield's class operand is not an inline type.
105 // runTestVerifyError("withfieldObj", "Bad type on operand stack");
106
107 // Test that null is not assignable to an inline type.
108 runTestVerifyError("NoNullVT",
109 "Type null (current frame, stack[1]) is not assignable to 'QNoNullVT;'");
110
111 // Test that a [Qjava/lang/Object; signature does not crash the verifier.
112 runTestVerifyError("QObject",
113 "'[Ljava/lang/String;' (current frame, stack[0]) is not assignable to '[Qjava/lang/Object;'");
114 }
115 }
|
77 // Test that a withfield opcode with an out of bounds cp index causes a VerifyError.
78 runTestVerifyError("wthFldBadCP", "Illegal constant pool index");
79
80 // Test that VerifyError is thrown if the first operand on the stack is not assignable
81 // to withfield's field.
82 runTestVerifyError("wthFldBadFldVal", "Bad type on operand stack");
83
84 // Test that VerifyError is thrown if the second operand on the stack is a primitive.
85 runTestVerifyError("wthFldBadFldRef", "Bad type on operand stack");
86
87 // Test that ClassFormatError is thrown for a class file, with major version 54, that
88 // contains a withfield opcode.
89 runTestFormatError("wthFldBadMajorVersion", "withfield not supported by this class file version");
90
91 // Test VerifyError is thrown if a withfields's cp entry is not a field.
92 runTestVerifyError("wthFldWrongCPType", "Illegal type at constant pool entry");
93
94 // Test that VerifyError is thrown if the class for a withfields's cp fieldref
95 // entry is java.lang.Object and the reference on the stack is an inline type.
96 runTestVerifyError("wthFldObject", "must be identical inline types");
97
98 // Test VerifyError is thrown if a monitorenter's cp entry is an inline type.
99 runTestVerifyError("monEnterVT", "Bad type on operand stack");
100 */
101
102 // Test VerifyError is thrown if a defaultvalue's cp entry is an inline type.
103 runTestVerifyError("defValueObj", "Illegal type at constant pool entry 4");
104
105 // Test VerifyError is thrown if a withfield's class operand is not an inline type.
106 // runTestVerifyError("withfieldObj", "Bad type on operand stack");
107
108 // Test that null is not assignable to an inline type.
109 runTestVerifyError("NoNullVT",
110 "Type null (current frame, stack[1]) is not assignable to 'QNoNullVT;'");
111
112 // Test that a [Qjava/lang/Object; signature does not crash the verifier.
113 runTestVerifyError("QObject",
114 "'[Ljava/lang/String;' (current frame, stack[0]) is not assignable to '[Qjava/lang/Object;'");
115 }
116 }
|