RFR: 8287281: adjust guarantee in Handshake::execute for the case of target thread being current [v4]
Johan Sjölén
duke at openjdk.java.net
Tue Jun 7 12:42:06 UTC 2022
On Mon, 6 Jun 2022 16:36:01 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> 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.
Removed unused variable, moved the `state != NULL` assert up and removed the `state->get_thread() != NULL` assert as it's unnecessary.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8992
More information about the serviceability-dev
mailing list