RFR: 8308762: Metaspace leak with Instrumentation.retransform
Jean-Philippe Bempel
jpbempel at openjdk.org
Thu Jul 6 11:05:54 UTC 2023
On Thu, 6 Jul 2023 06:45:15 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Sorry I'm having a lot of trouble trying to understand the fix in the context of the problem description as outlined in the bug report. The issue pertained only to the treatment of Throwable due to it being pre-resolved by the verifier, but your fix is looking at Field and MethodRefs ??
For the Klass in itself, there is this method `is_unresolved_class_mismatch` that compares it correctly if entry differs by resolved and unresolved state. Except that for MethodRef and FieldRef, the Klass here is also compared but strictly without taking into account the already resolved state (in this case of the Throwable). So that's why I am adding the call to `is_unresolved_class_mismatch` for those cases.
> There are also remaining comments about resolved and unresolved class entries deliberately not being considered the same.
Sorry I don't understand what you mean, can you elaborate please?
> Has this been moved verbatim from jvmtiRedefineClasses.cpp?
yes
> There are a couple of style nits with that existing code that don't fit this file:
>
> * parameters should line up ie. const under int
> * no comment on the closing brace of the method body.
Will adjust accordingly
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14780#issuecomment-1623474415
PR Review Comment: https://git.openjdk.org/jdk/pull/14780#discussion_r1254281202
More information about the serviceability-dev
mailing list