8369482: JVMTI + Loom: JDK-8368159 introduced safepoint poll in disallowed state

Co-authored-by: Patricio Chilano Mateo <pchilanomate@openjdk.org>
Reviewed-by: sspitsyn, pchilanomate
This commit is contained in:
Serguei Spitsyn 2025-10-14 05:40:07 +00:00 committed by Axel Boldt-Christmas
parent be0e49b7e2
commit 5bf1bab5b3
2 changed files with 3 additions and 3 deletions

View File

@ -1694,7 +1694,7 @@ bool JvmtiExport::has_frame_pops(JavaThread* thread) {
if (!can_post_frame_pop()) {
return false;
}
JvmtiThreadState *state = get_jvmti_thread_state(thread);
JvmtiThreadState *state = thread->jvmti_thread_state();
if (state == nullptr) {
return false;
}
@ -1713,7 +1713,7 @@ void JvmtiExport::continuation_yield_cleanup(JavaThread* thread, jint continuati
}
assert(thread == JavaThread::current(), "must be");
JvmtiThreadState *state = get_jvmti_thread_state(thread);
JvmtiThreadState *state = thread->jvmti_thread_state();
if (state == nullptr) {
return;
}

View File

@ -1626,7 +1626,7 @@ static void invalidate_jvmti_stack(JavaThread* thread) {
}
static void jvmti_yield_cleanup(JavaThread* thread, ContinuationWrapper& cont) {
if (JvmtiExport::has_frame_pops(thread)) {
if (!cont.entry()->is_virtual_thread() && JvmtiExport::has_frame_pops(thread)) {
int num_frames = num_java_frames(cont);
ContinuationWrapper::SafepointOp so(Thread::current(), cont);