hotspot/src/share/vm/runtime/sharedRuntime.cpp
changeset 22241 58579a498f3a
parent 22223 82e95c562133
child 22247 cde20a0fa906
equal deleted inserted replaced
22240:ec02eda6b9b6 22241:58579a498f3a
   492     thread->set_is_method_handle_return(nm->is_method_handle_return(return_address));
   492     thread->set_is_method_handle_return(nm->is_method_handle_return(return_address));
   493     // native nmethods don't have exception handlers
   493     // native nmethods don't have exception handlers
   494     assert(!nm->is_native_method(), "no exception handler");
   494     assert(!nm->is_native_method(), "no exception handler");
   495     assert(nm->header_begin() != nm->exception_begin(), "no exception handler");
   495     assert(nm->header_begin() != nm->exception_begin(), "no exception handler");
   496     if (nm->is_deopt_pc(return_address)) {
   496     if (nm->is_deopt_pc(return_address)) {
       
   497       // If we come here because of a stack overflow, the stack may be
       
   498       // unguarded. Reguard the stack otherwise if we return to the
       
   499       // deopt blob and the stack bang causes a stack overflow we
       
   500       // crash.
       
   501       bool guard_pages_enabled = thread->stack_yellow_zone_enabled();
       
   502       if (!guard_pages_enabled) guard_pages_enabled = thread->reguard_stack();
       
   503       assert(guard_pages_enabled, "stack banging in deopt blob may cause crash");
   497       return SharedRuntime::deopt_blob()->unpack_with_exception();
   504       return SharedRuntime::deopt_blob()->unpack_with_exception();
   498     } else {
   505     } else {
   499       return nm->exception_begin();
   506       return nm->exception_begin();
   500     }
   507     }
   501   }
   508   }