RFR: 8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION

Erik Gahlin egahlin at openjdk.org
Fri Oct 27 13:49:32 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

Marked as reviewed by egahlin (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/16379#pullrequestreview-1701841786


More information about the hotspot-jfr-dev mailing list