--- old/src/share/vm/opto/output.cpp 2014-03-06 11:59:59.180702046 +0100 +++ new/src/share/vm/opto/output.cpp 2014-03-06 11:59:58.762084924 +0100 @@ -171,8 +171,13 @@ // Determine if we need to generate a stack overflow check. // Do it if the method is not a stub function and // has java calls or has frame size > vm_page_size/8. + // The debug VM checks that deoptimization doesn't trigger an + // unexpected stack overflow (compiled method stack banging should + // guarantee it doesn't happen) so we always need the stack bang in + // a debug VM. return (UseStackBanging && stub_function() == NULL && - (has_java_calls() || frame_size_in_bytes > os::vm_page_size()>>3)); + (has_java_calls() || frame_size_in_bytes > os::vm_page_size()>>3 + NOT_DEBUG(|| true))); } bool Compile::need_register_stack_bang() const {