RFR: 8361103: java_lang_Thread::async_get_stack_trace does not properly protect JavaThread [v2]

David Holmes dholmes at openjdk.org
Tue Jul 8 01:22:41 UTC 2025


On Thu, 3 Jul 2025 20:03:06 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> The fix updates `java_lang_Thread::async_get_stack_trace()` (used by `java.lang.Thread.getStackTrace()` to get stack trace for platform and mounted virtual threads) to correctly use `ThreadListHandle` for thread protection.
>> 
>> Testing: tier1..5
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update javaClasses.cpp

src/hotspot/share/classfile/javaClasses.cpp line 1899:

> 1897:   }
> 1898:   if (java_thread == nullptr) {
> 1899:     // terminated platform thread or unmounted virtual thread

You can leave the `// terminated platform thread` comment

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26119#discussion_r2191285973


More information about the hotspot-dev mailing list