RFR: 8313816: Accessing jmethodID might lead to spurious crashes [v10]

Coleen Phillimore coleenp at openjdk.org
Wed Nov 29 13:32:12 UTC 2023


On Wed, 29 Nov 2023 11:45:53 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:

>> src/hotspot/share/oops/instanceKlass.cpp line 4236:
>> 
>>> 4234:     if (method != nullptr) {
>>> 4235:       method->clear_jmethod_id();
>>> 4236:     }
>> 
>> This loops through the methods in the InstanceKlass that was a previous version klass, and clears the jmethodIDs for all the methods.  Will it clear the jmethodIDs for the EMCP methods also, and should it?
>> The jmethodID for EMCP methods are replaced with a the new version, so the Method* in this list won't find a matching jmethodID.  Maybe this can be restricted to obsolete methods?
>
> Restricting to obsolete methods sounds like a good idea.

Can you confirm my observation above, that EMCP jmethodIDs are replaced?  I haven't looked at this code in a while.  Thanks.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16662#discussion_r1409283757


More information about the serviceability-dev mailing list