8303624: The java.lang.Thread.FieldHolder can be null for JNI attaching threads

Reviewed-by: alanb, dcubed
This commit is contained in:
David Holmes 2023-03-10 03:08:26 +00:00
parent d06308c54a
commit e26cc52600
3 changed files with 42 additions and 37 deletions

View file

@ -235,7 +235,7 @@ void JavaThread::allocate_threadObj(Handle thread_group, const char* thread_name
vmSymbols::threadgroup_string_void_signature(),
thread_group,
name,
THREAD);
CHECK);
} else {
// Thread gets assigned name "Thread-nnn" and null target
// (java.lang.Thread doesn't have a constructor taking only a ThreadGroup argument)
@ -246,7 +246,7 @@ void JavaThread::allocate_threadObj(Handle thread_group, const char* thread_name
vmSymbols::threadgroup_runnable_void_signature(),
thread_group,
Handle(),
THREAD);
CHECK);
}
os::set_priority(this, NormPriority);