RFR: 8291736: find_method_handle_intrinsic leaks Method* [v2]
Coleen Phillimore
coleenp at openjdk.org
Fri Aug 26 12:51:54 UTC 2022
On Thu, 25 Aug 2022 22:48:37 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> This call does not go to Java. The other table does - the invoke_method_type_table. This just creates an intrinsic method and an adapter to go with it from the AdapterHandlerLibrary.
>
> Line 2087 can throw an exception. If you want to hold the mutex across the entire body you need to throw the exception after releasing the lock.
Sorry, I didn't read what you actually wrote (just what I thought you wrote). Line 2080 can also throw an exception for metaspace allocation failure. I don't believe that we always do this outside a lock. This is a subtle interaction that only you noticed. I'm not sure what to do with the metaspace allocation failure. Moving throwing the other exception outside the lock uglifies the logic but isn't hard to do.
-------------
PR: https://git.openjdk.org/jdk/pull/9983
More information about the hotspot-runtime-dev
mailing list