8241053: Hotspot runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java test fails on Alpine Linux with debug build

Reviewed-by: dholmes, stuefe, dsamersoff
This commit is contained in:
Alexander Scherbatiy 2020-08-12 15:01:12 +03:00
parent 7f0777ae88
commit c55e52e01f

View file

@ -921,7 +921,17 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
assert(is_aligned(stack_size, os::vm_page_size()), "stack_size not aligned"); assert(is_aligned(stack_size, os::vm_page_size()), "stack_size not aligned");
int status = pthread_attr_setstacksize(&attr, stack_size); int status = pthread_attr_setstacksize(&attr, stack_size);
assert_status(status == 0, status, "pthread_attr_setstacksize"); if (status != 0) {
// pthread_attr_setstacksize() function can fail
// if the stack size exceeds a system-imposed limit.
assert_status(status == EINVAL, status, "pthread_attr_setstacksize");
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;
}
ThreadState state; ThreadState state;