RFR: 8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION

Markus Grönlund mgronlun at openjdk.org
Thu Oct 26 15:13:04 UTC 2023


Greetings,

sometimes when running JFR with -Xverify:all, the bytecode retransform would fail with an JVMTI_ERROR_FAILS_VERIFICATION.

I say sometimes because it depends on if event classes that are located in java.base are loaded before JFR is started.

If so, for those event classes, the type of the static field eventConfiguration is untyped, i.e. java.lang.Object, because of the java.base module cannot use types in module jdk.jfr.

As part of the instrumentation of commit(), when issuing invokevirtual instructions for this receiver, a proper downcast must be performed using checkcast.

Testing: jdk_jfr

Thanks
Markus

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

Commit messages:
 - whitespace
 - 8316271

Changes: https://git.openjdk.org/jdk/pull/16379/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16379&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8316271
  Stats: 63 lines in 2 files changed: 62 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/16379.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16379/head:pull/16379

PR: https://git.openjdk.org/jdk/pull/16379


More information about the hotspot-jfr-dev mailing list