RFR: 8253540: InterpreterRuntime::monitorexit should be a JRT_LEAF function
Coleen Phillimore
coleenp at openjdk.java.net
Wed Sep 23 20:48:38 UTC 2020
On Wed, 23 Sep 2020 17:13:45 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> src/hotspot/share/interpreter/interpreterRuntime.cpp line 742:
>>
>>> 740: oop obj = elem->obj();
>>> 741: assert(!obj->is_unlocked(), "caller checked these conditions");
>>> 742: assert(Universe::heap()->is_in_or_null(obj), "must be NULL or an object");
>>
>> obj can't be null at this point
>
> Agreed. If 'obj == NULL' on L740, the L741 would crash in ASSERT enabled bits.
> The same is true of the original code if 'obj == NULL':
> old L744: if (elem == NULL || h_obj()->is_unlocked()) {
> we would crash on is_unlocked() call.
Yes should change assert to Universe::heap()->is_in(obj).
-------------
PR: https://git.openjdk.java.net/jdk/pull/320
More information about the hotspot-runtime-dev
mailing list