RFR: 8367725: Incorrect reading of oop in SuspendResumeManager::suspend while thread is blocked [v9]

Serguei Spitsyn sspitsyn at openjdk.org
Wed Sep 17 19:51:22 UTC 2025


On Wed, 17 Sep 2025 19:13:37 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Leonid Mesnik has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   updated after David's feedback
>
> src/hotspot/share/runtime/suspendResumeManager.cpp line 104:
> 
>> 102:     ThreadBlockInVM tbivm(self);
>> 103:     MutexLocker ml(_state_lock, Mutex::_no_safepoint_check_flag);
>> 104:     set_suspended_with_id(id, register_vthread_SR);
> 
> Nit: I'd prefer to have the same function name overloaded with a different parameter type. Then it will be consistent with `JvmtiVTSuspender::register_vthread_suspend(*)` overloaded functions.
> There can be different opinions here, of course.

Renaming it to `self_suspend()` is also a good choice IMHO. :)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27317#discussion_r2356612043


More information about the serviceability-dev mailing list