< prev index next >
src/hotspot/os/aix/os_aix.cpp
Print this page
rev 50463 : 8204652: [aix] fix thread stack allocation, too big stack sizes not recognized
@@ -897,18 +897,19 @@
// thread size in attr unchanged. If this is the minimal stack size as set
// by pthread_attr_init this leads to crashes after thread creation. E.g. the
// 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);
}
// Save some cycles and a page by disabling OS guard pages where we have our own
// VM guard pages (in java threads). For other threads, keep system default guard
// pages in place.
- if (thr_type == java_thread || thr_type == compiler_thread) {
+ if (ret == 0 && (thr_type == java_thread || thr_type == compiler_thread)) {
ret = pthread_attr_setguardsize(&attr, 0);
}
pthread_t tid = 0;
if (ret == 0) {
< prev index next >