On Thu, 14 Aug 2025 00:01:29 GMT, Patricio Chilano Mateo
<[email protected]> wrote:
>> Leonid Mesnik has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - added _
>> - wong phase
>
> src/hotspot/share/prims/jvmtiExport.cpp line 1838:
>
>> 1836: {
>> 1837: ThreadInVMfromJava tiv(thread);
>> 1838: state = get_jvmti_thread_state(thread);
>
> The issue I see is that `get_jvmti_thread_state()` can safepoint for virtual
> threads (and now also for platform threads because of `~ThreadInVMfromJava`),
> which brings us back to the bug 8255452 was trying to fix: if there is a
> return oop at the top of the stack, it could become invalid if a GC occurs. I
> think we will have to unconditionally save the return value in case it's an
> oop, before doing anything else.
Thank you, Patricio! Good catch and suggestion.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26713#discussion_r2276043185