RFR: 8365192: post_meth_exit should be in vm state when calling get_jvmti_thread_state [v6]
David Holmes
dholmes at openjdk.org
Wed Aug 20 05:37:45 UTC 2025
On Tue, 19 Aug 2025 23:25:23 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> The method
>> get_jvmti_thread_state()
>> should be called only while thread is in vm state.
>>
>> The post_method_exit is doing some preparation before switching to vm state. This cause issues if thread is needed to initialize jvmti thread state.
>>
>> The fix was found using jvmti stress agent and thus no additional regression test is required.
>
> Leonid Mesnik has updated the pull request incrementally with three additional commits since the last revision:
>
> - moved JRT_BLOCK
> - added assertion and removed comment.
> - test fixed.
src/hotspot/share/prims/jvmtiExport.cpp line 1839:
> 1837: value.l = 0L;
> 1838: // post_method_exist is called only when the method is not exit because of
> 1839: // exception so result should be always initialized.
Suggestion:
// post_method_exit is only called when the method exits normally,
// so result should be always initialized.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26713#discussion_r2286979400
More information about the hotspot-dev
mailing list