Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8306965: osThread allocation failures should not abort the VM #13879

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hotspot/os/aix/os_aix.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/os/bsd/os_bsd.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/os/linux/os_linux.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/os/windows/os_windows.cpp
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
}
Expand Down