[jdk25u] Integrated: 8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking

Chad Rakoczy duke at openjdk.org
Fri Sep 19 22:12:24 UTC 2025


On Fri, 12 Sep 2025 21:26:04 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

This pull request has now been integrated.

Changeset: 81493188
Author:    Chad Rakoczy <chadrako at amazon.com>
Committer: Paul Hohensee <phh at openjdk.org>
URL:       https://git.openjdk.org/jdk25u/commit/81493188d64dd6c81d14d7c23f2b12176bb0bccc
Stats:     187 lines in 3 files changed: 186 ins; 0 del; 1 mod

8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking

Backport-of: 46ae1ee87152742082e6047d0556944d7ae4567d

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

PR: https://git.openjdk.org/jdk25u/pull/197


More information about the jdk-updates-dev mailing list