On Mon, 6 Jun 2022 07:20:10 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> src/hotspot/share/prims/jvmtiEventController.cpp line 370:
>> 
>>> 368:   }
>>> 369:   EnterInterpOnlyModeClosure hs;
>>> 370:   assert(state->get_thread() != NULL, "sanity check");
>> 
>> Existing: We have already performed this check. We set `target` above and 
>> returned if it was `NULL`.
>
> We also no longer need L358 as `current` is now unused.

JavaThread *target = state->get_thread();
  Thread *current = Thread::current();

  assert(state != NULL, "sanity check");

The `assert()` on L360 is in the wrong place. If `state == NULL`, we would
have crashed on L357 before we got to the assert(). This bug is pre-existing
and not due to this PR.

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

PR: https://git.openjdk.java.net/jdk/pull/8992

Reply via email to