RFR: 8277444: Race condition on Instrumentation.retransformClasses() and class linking [v2]

Evgeny Astigeevich eastigeevich at openjdk.org
Tue Aug 26 13:39:14 UTC 2025


On Tue, 26 Aug 2025 04:50:37 GMT, David Holmes <dholmes at openjdk.org> wrote:

>>> @dean-long `retransformClasses` is specified to to be able to throw `LinkageErrors`.
>> 
>> I see that in java.lang.instrument, but the JVMTI spec says "In response to this call, no events other than the ClassFileLoadHook event will be sent."  Normally during linking we send the ClassPrepare event.
>
>> > @dean-long `retransformClasses` is specified to to be able to throw `LinkageErrors`.
>> 
>> I see that in java.lang.instrument, but the JVMTI spec says "In response to this call, no events other than the ClassFileLoadHook event will be sent." Normally during linking we send the ClassPrepare event.
> 
> To have a Class object it must have already undergone the "preparation" part of linking (it is done at the end of loading when we create the class mirror).

@dholmes-ora Thank you for review and the suggestions.

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

PR Comment: https://git.openjdk.org/jdk/pull/26863#issuecomment-3224210817


More information about the hotspot-dev mailing list