[jdk11u-dev] RFR: 8277444: Data race between JvmtiClassFileReconstituter::copy_bytecodes and class linking
Chad Rakoczy
duke at openjdk.org
Thu Sep 18 22:24:04 UTC 2025
Backport of https://bugs.openjdk.org/browse/JDK-8277444. The backport was not clean but the fixes were trivial naming differences
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
-------------
Commit messages:
- Backport 46ae1ee87152742082e6047d0556944d7ae4567d
Changes: https://git.openjdk.org/jdk11u-dev/pull/3096/files
Webrev: https://webrevs.openjdk.org/?repo=jdk11u-dev&pr=3096&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8277444
Stats: 185 lines in 3 files changed: 185 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk11u-dev/pull/3096.diff
Fetch: git fetch https://git.openjdk.org/jdk11u-dev.git pull/3096/head:pull/3096
PR: https://git.openjdk.org/jdk11u-dev/pull/3096
More information about the jdk-updates-dev
mailing list