Name: akC45999 Date: 10/08/98
Some tests try to access unexisting or unaccessible field and expect an
exception. But the JIT removes field access instructions because the
result is never used. So no exception occured. It is illegal optimization,
because it may affect the observable behavior of the program.
For example, after such optimization following tests does not
throw exceptions described in JVMS section 5.2 "Field and Method
Resolution" as expected.
The bug causes failures of the following tests of JCK12a under JDK12fcsM(x86)
vm/constantpool/userDefined/userDefined002/userDefined00201/userDefined00201
vm/instr/getfield/getfield006/getfield00605m1/getfield00605m1
vm/instr/getfield/getfield011/getfield01101m1/getfield01101m1
vm/instr/getfield/getfield011/getfield01103m1/getfield01103m1
vm/instr/getfield/getfield013/getfield01301m1/getfield01301m1
vm/instr/getfield/getfield013/getfield01302m1/getfield01302m1
vm/instr/getstatic/getstatic008/getstatic00801m1/getstatic00801m1
vm/instr/getstatic/getstatic008/getstatic00802m1/getstatic00802m1
vm/instr/getstatic/getstatic008/getstatic00803m1/getstatic00803m1
vm/instr/getstatic/getstatic010/getstatic01001m1/getstatic01001m1
vm/instr/getstatic/getstatic011/getstatic01101m1/getstatic01101m1
Bug may be illustrated by simple test:
class test {
// static Field aaa:"I";
public static Method main:"([Ljava/lang/String;)V"
stack 2 locals 1
{
getstatic aaa:I;
return;
}
}
-----------------------------------------
======================================================================
- duplicates
-
JDK-4178852 Exceptions+JIT combination causes VM test failures on x86/Solaris systems.
- Closed