RFR: 8365192: post_meth_exit should be in vm state when calling get_jvmti_thread_state [v2]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Aug 13 07:19:13 UTC 2025
On Wed, 13 Aug 2025 06:26:16 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 one additional commit since the last revision:
>
> simplified after feedback
looks good
src/hotspot/share/prims/jvmtiExport.cpp line 1837:
> 1835: JvmtiThreadState *state = nullptr;
> 1836: {
> 1837: ThreadInVMfromJava __tiv(thread);
Nit: Maybe rename: `__tiv` => `tiv`. The prefix `__` is normally used in macros to avoid potential naming conflicts.
-------------
Marked as reviewed by sspitsyn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26713#pullrequestreview-3114238397
PR Review Comment: https://git.openjdk.org/jdk/pull/26713#discussion_r2272301754
More information about the serviceability-dev
mailing list