Integrated: 8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION

Markus Grönlund mgronlun at openjdk.org
Mon Oct 30 11:54:46 UTC 2023


On Thu, 26 Oct 2023 14:45:34 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> 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 whether event classes 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 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

This pull request has now been integrated.

Changeset: c4c66aba
Author:    Markus Grönlund <mgronlun at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c4c66aba93cf061d487eddbd18e9e7e3e9c9f3a8
Stats:     63 lines in 2 files changed: 62 ins; 1 del; 0 mod

8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION

Reviewed-by: egahlin

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

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


More information about the hotspot-jfr-dev mailing list