Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
fix JVMTI GetThreadState to check one bit vs whole status word
- Loading branch information
|
@@ -925,7 +925,7 @@ JvmtiEnv::GetThreadState(jthread thread, jint* thread_state_ptr) { |
|
|
} |
|
|
jshort vthread_state = java_lang_VirtualThread::state(thread_oop); |
|
|
|
|
|
if (vthread_state != java_lang_VirtualThread::RUNNING) { |
|
|
if (!(vthread_state & java_lang_VirtualThread::RUNNING)) { |
|
|
jint state = (jint) java_lang_VirtualThread::map_state_to_thread_status(vthread_state); |
|
|
if (java_lang_Thread::interrupted(thread_oop)) { |
|
|
state |= JVMTI_THREAD_STATE_INTERRUPTED; |
|
|
|
@@ -1809,7 +1809,7 @@ VM_VirtualThreadGetThreadState::doit() { |
|
|
oop carrier_thread_oop = java_lang_VirtualThread::carrier_thread(_vthread_h()); |
|
|
jint state; |
|
|
|
|
|
if (vthread_state == java_lang_VirtualThread::RUNNING && carrier_thread_oop != NULL) { |
|
|
if ((vthread_state & java_lang_VirtualThread::RUNNING) && carrier_thread_oop != NULL) { |
|
|
state = java_lang_Thread::get_thread_status(carrier_thread_oop); |
|
|
} else { |
|
|
state = (jint) java_lang_VirtualThread::map_state_to_thread_status(vthread_state); |
|
|