RFR: 8361103: java_lang_Thread::async_get_stack_trace does not properly protect JavaThread [v4]
David Holmes
dholmes at openjdk.org
Thu Jul 10 23:21:39 UTC 2025
On Thu, 10 Jul 2025 23:10:07 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>>> Added extra argument to cv_internal_thread_to_JavaThread to return carrrier's JavaThread.
>>
>> @alexmenkov I think we need a separate JBS issue for this and have runtime fix it. I want to be sure we are fixing it in the right/best way. I don't think we need the extra argument, but need to examine the existing usages. Chances are that any code trying to deal with virtual thread's via the API is actually doing it wrong and will need fixing anyway. I will file a bug.
>
>> > Added extra argument to cv_internal_thread_to_JavaThread to return carrrier's JavaThread.
>>
>> @alexmenkov I think we need a separate JBS issue for this and have runtime fix it. I want to be sure we are fixing it in the right/best way. I don't think we need the extra argument, but need to examine the existing usages. Chances are that any code trying to deal with virtual thread's via the API is actually doing it wrong and will need fixing anyway. I will file a bug.
>
> I think just update the method to use carrier is error prone and callers should explicitly request the functionality.
> I'm fine with separate issue, will remove changes in threadSMR.* and restore original handling of virtual thread carrier
@alexmenkov Alex, the form of this fix will be determined by whatever we end up doing for [JDK-8361912](https://bugs.openjdk.org/browse/JDK-8361912). I don't see any point in re-doing this fix later, so I suggest just putting this on hold for now. I will ensure the other issue is fixed within the next week.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26119#issuecomment-3059489700
More information about the hotspot-dev
mailing list