8306965: osThread allocation failures should not abort the VM
Reviewed-by: lfoltan
This commit is contained in:
parent
4795c395e9
commit
3cb606ef5b
src/hotspot/os
@ -743,7 +743,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
assert(thread->osthread() == nullptr, "caller responsible");
|
||||
|
||||
// Allocate the OSThread object.
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@ -857,7 +857,7 @@ bool os::create_attached_thread(JavaThread* thread) {
|
||||
#endif
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
|
@ -586,7 +586,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
assert(thread->osthread() == nullptr, "caller responsible");
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@ -679,7 +679,7 @@ bool os::create_attached_thread(JavaThread* thread) {
|
||||
#endif
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
|
@ -851,7 +851,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
assert(thread->osthread() == nullptr, "caller responsible");
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
}
|
||||
@ -975,7 +975,7 @@ bool os::create_attached_thread(JavaThread* thread) {
|
||||
#endif
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
|
@ -568,7 +568,7 @@ unsigned __stdcall os::win32::thread_native_entry(void* t) {
|
||||
static OSThread* create_os_thread(Thread* thread, HANDLE thread_handle,
|
||||
int thread_id) {
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
if (osthread == nullptr) return nullptr;
|
||||
|
||||
// Initialize the JDK library's interrupt event.
|
||||
@ -673,7 +673,7 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
|
||||
unsigned thread_id;
|
||||
|
||||
// Allocate the OSThread object
|
||||
OSThread* osthread = new OSThread();
|
||||
OSThread* osthread = new (std::nothrow) OSThread();
|
||||
if (osthread == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user