-
Bug
-
Resolution: Fixed
-
P3
-
1.1.1
-
1.2alpha2
-
sparc
-
solaris_2.4
-
Not verified
Name: laC46010 Date: 03/19/97
Incorrect use of monitorexit cause an exception to be thrown,
as described in section 6.4 of The Java Virtual Machine Instruction Set:
"Otherwise, if the current thread is not the owner of the monitor,
monitorexit throws an IllegalMonitorStateException."
This exception can be caught in calling methods but
cannot be caught in the current method.
--------------------- monitorexit00802a.jasm
package javasoft/sqe/tests/vm/monitorexit/monitorexit008/monitorexit00802;
public class monitorexit00802a {
public static Method run:"([Ljava/lang/String;Ljava/io/PrintStream;)I"
stack 3 locals 2
{
new class java/lang/Object;
dup;
invokenonvirtual Method java/lang/Object.<init>:"()V";
// dup; monitorenter;
try t1;
monitorexit; // as monitorenter commented,
// this must cause an exception
iconst_2/*STATUS_FAILED*/;
ireturn;
endtry t1;
catch t1 java/lang/IllegalMonitorStateException;
iconst_0/*STATUS_PASSED*/;
ireturn;
}
}
--------------------------
======================================================================
- relates to
-
JDK-4042419 JCK test monitorexit00801 is failing JIT'ed.
- Closed