Thank you for the answer. Not, sure not reject the method :). I think that it will be nice if VM release all locks entered by thread that threw exception. But if it's impossible, I nothing can be say against closing this JIRA.
Thanks, Alexander Shipilov >-----Original Message----- >From: Rana Dasgupta [mailto:[EMAIL PROTECTED] >Sent: Friday, January 26, 2007 1:35 AM >To: [email protected] >Subject: Re: [drlvm] If method throws exception after monitorenter, JIT >does not release the lock > >I am not sure if this is a problem. Would you expect the jit to generate >the >finally code, reject the method, or what? > >On 1/25/07, Shipilov, Alexander D <[EMAIL PROTECTED]> wrote: >> >> Hello, folks, >> >> Could you, please clarify one issue. >> The problem has described in JIRA >> https://issues.apache.org/jira/browse/HARMONY-2504. >> >> Thread makes monitorenter, and throws exception (NPE) to the output. >> JASMIN code: >> .method public run()V >> .limit stack 3 >> .limit locals 3 >> >> getstatic Test/testField Ljava/lang/Object; >> monitorenter >> >> new java/lang/NullPointerException >> dup >> invokespecial java/lang/NullPointerException/<init>()V >> athrow >> >> getstatic Test/testField Ljava/lang/Object; >> monitorexit >> >> return >> .end method >> >> Then other thread tries to get a lock. Deadlock occurs on Harmony. >> Does this behavior is correct? >> >> Thanks, >> Alexander Shipilov >>
