On Wed, 8 Jul 2026 05:11:36 GMT, David Holmes <[email protected]> wrote:

>> src/hotspot/share/prims/jvmtiEnvBase.cpp line 2458:
>> 
>>> 2456:     _result = JVMTI_ERROR_OPAQUE_FRAME;
>>> 2457:     return;
>>> 2458:   }
>> 
>> The `!JvmtiEnvBase::is_vthread_suspended(target_h(), _target_jt)` on L2450
>> above passes `_target_jt` and that function can dereference `_target_jt`.
>> 
>> Perhaps the `nullptr` check should be first.
>
> Agreed

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.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31759#discussion_r3547511393

Reply via email to