RFR: 8294538: missing is_unloading() check in SharedRuntime::fixup_callers_callsite()

Dean Long dlong at openjdk.org
Fri Oct 21 07:07:52 UTC 2022


On Thu, 20 Oct 2022 07:38:00 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> This change adds a missing is_unloading() check for the callee in SharedRuntime::fixup_callers_callsite() and removes from_compiled_entry_no_trampoline() because it is no longer used.
>
> src/hotspot/share/runtime/sharedRuntime.cpp line 2113:
> 
>> 2111:   NoSafepointVerifier nsv;
>> 2112: 
>> 2113:   CompiledMethod* callee = moop->code();
> 
> There is a moop->code() null check just a few lines below, so now it looks like we are reading the code pointer twice checking if it is null. Is ot enough to do that one time?

It's actually the same number of null checks as before, if you look at what from_compiled_entry_no_trampoline() used to do.  But I did consider removing the 2nd check, because no matter how late we check, we can always lose the race where it becomes null right after our last check.  It's harmless however, so I decided to keep it.

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

PR: https://git.openjdk.org/jdk/pull/10747


More information about the hotspot-dev mailing list