RFR: 8361103: java_lang_Thread::async_get_stack_trace does not properly protect JavaThread [v8]
Serguei Spitsyn
sspitsyn at openjdk.org
Tue Aug 12 08:53:18 UTC 2025
On Wed, 6 Aug 2025 19:12:31 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 src/hotspot/share/classfile/javaClasses.cpp
>
> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
This looks good to me. I've posted one nit though.
src/hotspot/share/classfile/javaClasses.cpp line 1906:
> 1904: GrowableArray<int>* _bcis;
> 1905:
> 1906: GetStackTraceHandshakeClosure(Handle thread_oop) :
Nit: I'd suggest to rename: `thread_oop` => `thread_h`
-------------
Marked as reviewed by sspitsyn (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26119#pullrequestreview-3109335046
PR Review Comment: https://git.openjdk.org/jdk/pull/26119#discussion_r2269158840
More information about the hotspot-dev
mailing list