changeset 50514:9c361050293f

8204652: [aix] fix thread stack allocation, too big stack sizes not recognized Reviewed-by: stuefe, dholmes
author goetz
date Sun, 10 Jun 2018 17:26:13 +0200
parents 3787e9158925
children f07979db6cb2
files src/hotspot/os/aix/os_aix.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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