diff src/share/vm/utilities/exceptions.cpp @ 3272:01147d8aac1d

7009923: JSR 292: VM crash in JavaThread::last_frame Summary: Handle stack overflow before the first frame is called, by printing out the called method and not walking the stack. Reviewed-by: dholmes, phh, dsamersoff
author coleenp
date Tue, 26 Apr 2011 14:04:43 -0400
parents 1d1603768966
children be4ca325525a f08d439fab8c
line wrap: on
line diff
--- a/src/share/vm/utilities/exceptions.cpp	Sat Apr 23 00:33:38 2011 -0400
+++ b/src/share/vm/utilities/exceptions.cpp	Tue Apr 26 14:04:43 2011 -0400
@@ -207,7 +207,7 @@
 }
 
 
-void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file, int line) {
+void Exceptions::throw_stack_overflow_exception(Thread* THREAD, const char* file, int line, methodHandle method) {
   Handle exception;
   if (!THREAD->has_pending_exception()) {
     klassOop k = SystemDictionary::StackOverflowError_klass();
@@ -215,13 +215,13 @@
     exception = Handle(THREAD, e);  // fill_in_stack trace does gc
     assert(instanceKlass::cast(k)->is_initialized(), "need to increase min_stack_allowed calculation");
     if (StackTraceInThrowable) {
-      java_lang_Throwable::fill_in_stack_trace(exception);
+      java_lang_Throwable::fill_in_stack_trace(exception, method());
     }
   } else {
     // if prior exception, throw that one instead
     exception = Handle(THREAD, THREAD->pending_exception());
   }
-  _throw_oop(THREAD, file, line, exception());
+  _throw(THREAD, file, line, exception);
 }
 
 void Exceptions::fthrow(Thread* thread, const char* file, int line, Symbol* h_name, const char* format, ...) {