harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [drlvm] If method throws exception after monitorenter, JIT does not release the lock
Date Thu, 25 Jan 2007 16:27:26 GMT
You can write such code with Jasmin only. Javac will generage finally
sequence to release monitors.
I do not sure if we need to fix this in both OPT and JET. May be a scenario
when such methods are rejected by OPT and passed by EM to JET is better.


On 1/25/07, Shipilov, Alexander D <alexander.d.shipilov@intel.com> 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
>



-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message