On Thu, 9 Jul 2026 01:54:03 GMT, David Holmes <[email protected]> wrote:
>> This `do_vthread` method is only called for the case where the target is an >> instance of `java_lang_VirtualThread` >> [[1]](https://github.com/openjdk/jdk/blob/1911bd7782e075f01eca7578c07d3f805c41c21d/src/hotspot/share/prims/jvmtiEnvBase.cpp#L2016). >> Method `JvmtiEnvBase::is_vthread_suspended` only uses the oop to check for >> suspension. > > That is a bit too subtle and we should not have to inspect > `is_vthread_suspended` to reason about the safety of passing null in this > case. Moving the null check seems prudent. The problem is that JCK test `stop00104.java` expects `JVMTI_ERROR_THREAD_NOT_SUSPENDED`, but if we move these checks around it might receive `JVMTI_ERROR_OPAQUE_FRAME` and fail. Same thing with `StopThreadTest.java`, although that is easier to fix. I replaced it with a call to `JvmtiVTSuspender::is_vthread_suspended` for now which doesn’t need `_target_jt`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31759#discussion_r3554404459
