RFR: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function

Martin Doerr mdoerr at openjdk.java.net
Wed Sep 23 19:30:36 UTC 2020


On Wed, 23 Sep 2020 19:19:24 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Read the caller of this function.
>
>> Read the caller of this function.
> 
> I have and I have even started quoting caller code.

Right, looks like the UseHeavyMonitors case in unlock_object misses the "Free entry" part.

I believe this is how it's supposed to work:
- TemplateTable::monitorexit only uses unlock_object if the obj is not null and it is found in the monitor section on
  stack.
- unlock_object should clear the obj field on stack ("Free entry" on x86)
- when calling monitorexit for the same unlocked obj, TemplateTable::monitorexit shouldn't find it on stack any more and
  throw the exception

-------------

PR: https://git.openjdk.java.net/jdk/pull/320


More information about the hotspot-runtime-dev mailing list