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

Dean Long dlong at openjdk.org
Mon Aug 25 21:14:34 UTC 2025


On Fri, 22 Aug 2025 20:28:08 GMT, Dean Long <dlong at openjdk.org> wrote:

>> Evgeny Astigeevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add missing include runtime/synchronizer.hpp
>
> This seems like the correct fix.  Forcing these APIs to link the class first would be a change in behavior and I assume it could cause linking-related exceptions to be thrown that the client might not expect.

> @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.

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

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


More information about the hotspot-dev mailing list