src/hotspot/os/aix/os_aix.cpp
changeset 50502 9c361050293f
parent 50429 83aec1d357d4
child 50667 cc58f1fa0438
--- a/src/hotspot/os/aix/os_aix.cpp	Mon Jun 11 12:09:59 2018 +0200
+++ b/src/hotspot/os/aix/os_aix.cpp	Sun Jun 10 17:26:13 2018 +0200
@@ -899,8 +899,12 @@
   // guard pages might not fit on the tiny stack created.
   int ret = pthread_attr_setstacksize(&attr, stack_size);
   if (ret != 0) {
-    log_warning(os, thread)("The thread stack size specified is invalid: " SIZE_FORMAT "k",
+    log_warning(os, thread)("The %sthread stack size specified is invalid: " SIZE_FORMAT "k",
+                            (thr_type == compiler_thread) ? "compiler " : ((thr_type == java_thread) ? "" : "VM "),
                             stack_size / K);
+    thread->set_osthread(NULL);
+    delete osthread;
+    return false;
   }
 
   // Save some cycles and a page by disabling OS guard pages where we have our own