RFR: 8293010: JDI ObjectReference/referringObjects/referringObjects001 fails assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) failed: checking

Chris Plummer cjplummer at openjdk.org
Thu Sep 1 19:48:25 UTC 2022


On Wed, 31 Aug 2022 21:47:05 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> The problem is that the following assert in the JvmtiExport::post_object_free is wrong:
> `  assert(env->is_enabled(JVMTI_EVENT_OBJECT_FREE), "checking");`
> 
> Even though the condition was checked before, it can be changed later as it is racy by JVM TI design.
> It has to be replaced with the check:
> 
>   if (!env->is_enabled(JVMTI_EVENT_OBJECT_FREE)) {
>     return; // the event type has been already disabled
>   }
> 
> 
> In progress: mach5 nsk.jvmti and nsk.jdi test runs.

Marked as reviewed by cjplummer (Reviewer).

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

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


More information about the hotspot-dev mailing list