equal
deleted
inserted
replaced
400 } |
400 } |
401 |
401 |
402 // Handle ALL stack overflow variations here |
402 // Handle ALL stack overflow variations here |
403 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
403 if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { |
404 address addr = (address) info->si_addr; |
404 address addr = (address) info->si_addr; |
405 if (thread->in_stack_yellow_zone(addr)) { |
405 if (thread->in_stack_yellow_reserved_zone(addr)) { |
406 // Sometimes the register windows are not properly flushed. |
406 // Sometimes the register windows are not properly flushed. |
407 if(uc->uc_mcontext.gwins != NULL) { |
407 if(uc->uc_mcontext.gwins != NULL) { |
408 ::handle_unflushed_register_windows(uc->uc_mcontext.gwins); |
408 ::handle_unflushed_register_windows(uc->uc_mcontext.gwins); |
409 } |
409 } |
410 if (thread->thread_state() == _thread_in_Java) { |
410 if (thread->thread_state() == _thread_in_Java) { |
422 } |
422 } |
423 } |
423 } |
424 } |
424 } |
425 // Throw a stack overflow exception. Guard pages will be reenabled |
425 // Throw a stack overflow exception. Guard pages will be reenabled |
426 // while unwinding the stack. |
426 // while unwinding the stack. |
427 thread->disable_stack_yellow_zone(); |
427 thread->disable_stack_yellow_reserved_zone(); |
428 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW); |
428 stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW); |
429 } else { |
429 } else { |
430 // Thread was in the vm or native code. Return and try to finish. |
430 // Thread was in the vm or native code. Return and try to finish. |
431 thread->disable_stack_yellow_zone(); |
431 thread->disable_stack_yellow_reserved_zone(); |
432 return true; |
432 return true; |
433 } |
433 } |
434 } else if (thread->in_stack_red_zone(addr)) { |
434 } else if (thread->in_stack_red_zone(addr)) { |
435 // Fatal red zone violation. Disable the guard pages and fall through |
435 // Fatal red zone violation. Disable the guard pages and fall through |
436 // to handle_unexpected_exception way down below. |
436 // to handle_unexpected_exception way down below. |