8176768: hotspot ignores PTHREAD_STACK_MIN when creating new threads

Use PTHREAD_STACK_MIN as a minimum, plus other stack size cleanup

Reviewed-by: dholmes, stuefe, dcubed
This commit is contained in:
Chris Plummer 2017-03-23 11:10:55 -07:00
parent 99d6ff5c76
commit 17a8069db3
8 changed files with 108 additions and 19 deletions

View file

@ -759,7 +759,8 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
// calculate stack size if it's not specified by caller
size_t stack_size = os::Posix::get_initial_stack_size(thr_type, req_stack_size);
pthread_attr_setstacksize(&attr, stack_size);
int status = pthread_attr_setstacksize(&attr, stack_size);
assert_status(status == 0, status, "pthread_attr_setstacksize");
ThreadState state;