fix stack overflow when page_size is not 4k

This commit is contained in:
nroskill
2023-04-04 15:14:33 +00:00
committed by ob-robot
parent 17c7709c25
commit e501bbe216
6 changed files with 5 additions and 11 deletions

View File

@ -1645,7 +1645,7 @@ int ObServer::init_pre_setting()
if (OB_SUCC(ret)) {
const int64_t stack_size = std::max(1L << 19, static_cast<int64_t>(GCONF.stack_size));
LOG_INFO("set stack_size", K(stack_size));
global_thread_stack_size = lib::ProtectedStackAllocator::adjust_size(stack_size) - SIG_STACK_SIZE;
global_thread_stack_size = stack_size - SIG_STACK_SIZE - ACHUNK_PRESERVE_SIZE;
}
return ret;
}