8204652: [aix] fix thread stack allocation, too big stack sizes not recognized
authorgoetz
Sun, 10 Jun 2018 17:26:13 +0200
changeset 50502 9c361050293f
parent 50501 3787e9158925
child 50503 f07979db6cb2
8204652: [aix] fix thread stack allocation, too big stack sizes not recognized Reviewed-by: stuefe, dholmes
src/hotspot/os/aix/os_aix.cpp
--- 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