1.1 --- a/src/share/vm/runtime/sharedRuntime.cpp Mon Jun 09 15:42:31 2014 -0700 1.2 +++ b/src/share/vm/runtime/sharedRuntime.cpp Tue Apr 01 09:36:49 2014 +0200 1.3 @@ -785,10 +785,13 @@ 1.4 // going to be unwound. Dispatch to a shared runtime stub 1.5 // which will cause the StackOverflowError to be fabricated 1.6 // and processed. 1.7 - // For stack overflow in deoptimization blob, cleanup thread. 1.8 - if (thread->deopt_mark() != NULL) { 1.9 - Deoptimization::cleanup_deopt_info(thread, NULL); 1.10 - } 1.11 + // Stack overflow should never occur during deoptimization: 1.12 + // the compiled method bangs the stack by as much as the 1.13 + // interpreter would need in case of a deoptimization. The 1.14 + // deoptimization blob and uncommon trap blob bang the stack 1.15 + // in a debug VM to verify the correctness of the compiled 1.16 + // method stack banging. 1.17 + assert(thread->deopt_mark() == NULL, "no stack overflow from deopt blob/uncommon trap"); 1.18 Events::log_exception(thread, "StackOverflowError at " INTPTR_FORMAT, pc); 1.19 return StubRoutines::throw_StackOverflowError_entry(); 1.20 }