[jdk21u-dev] RFR: 8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking

Goetz Lindenmaier goetz at openjdk.org
Sat Sep 20 15:38:16 UTC 2025


On Thu, 18 Sep 2025 21:13:39 GMT, Chad Rakoczy <duke at openjdk.org> wrote:

>> A clean backport of https://bugs.openjdk.org/browse/JDK-8277444
>> 
>> This fixes a race condition that occurs when a class is simultaneously retransformed via the Instrumentation API and linked. This can lead to invalid bytecode which will cause a VerifyError. Even worse, if class verifying is turned off, which it is by default for java.* classes, this will cause the JVM to crash/segfault.
>> 
>> The included test `test/jdk/java/lang/instrument/RetransformBigClassTest.java fails before the patch and passes after`
>
> Waiting to request maintainer approval until backport is merged in newer JDKs

Hi @chadrako 
this seems to be a quite unlikely situation.  Also, it's a long standing bug. I would prefer to give it some time in 25&26 before backporting it to LTS releases already widely used.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2232#issuecomment-3315058216


More information about the jdk-updates-dev mailing list