8139864: Improve handling of stack protection zones

Reviewed-by: stuefe, coleenp, fparain
This commit is contained in:
Goetz Lindenmaier 2015-12-20 10:37:23 -05:00
parent 8c13cfe16c
commit b5bca5cc1b
43 changed files with 314 additions and 228 deletions

View file

@ -3479,8 +3479,9 @@ jint os::init_2(void) {
// Add in 2*BytesPerWord times page size to account for VM stack during
// class initialization depending on 32 or 64 bit VM.
os::Bsd::min_stack_allowed = MAX2(os::Bsd::min_stack_allowed,
(size_t)(StackReservedPages+StackYellowPages+StackRedPages+StackShadowPages+
2*BytesPerWord COMPILER2_PRESENT(+1)) * Bsd::page_size());
JavaThread::stack_guard_zone_size() +
JavaThread::stack_shadow_zone_size() +
2*BytesPerWord COMPILER2_PRESENT(+1) * Bsd::page_size());
size_t threadStackSizeInBytes = ThreadStackSize * K;
if (threadStackSizeInBytes != 0 &&