1.1 --- a/src/share/vm/utilities/exceptions.cpp Fri Aug 22 12:03:49 2014 -0700 1.2 +++ b/src/share/vm/utilities/exceptions.cpp Thu Aug 21 13:57:51 2014 -0700 1.3 @@ -85,9 +85,13 @@ 1.4 #endif // ASSERT 1.5 1.6 if (thread->is_VM_thread() 1.7 - || thread->is_Compiler_thread() ) { 1.8 + || thread->is_Compiler_thread() 1.9 + || DumpSharedSpaces ) { 1.10 // We do not care what kind of exception we get for the vm-thread or a thread which 1.11 // is compiling. We just install a dummy exception object 1.12 + // 1.13 + // We also cannot throw a proper exception when dumping, because we cannot run 1.14 + // Java bytecodes now. A dummy exception will suffice. 1.15 thread->set_pending_exception(Universe::vm_exception(), file, line); 1.16 return true; 1.17 } 1.18 @@ -108,9 +112,13 @@ 1.19 } 1.20 1.21 if (thread->is_VM_thread() 1.22 - || thread->is_Compiler_thread() ) { 1.23 + || thread->is_Compiler_thread() 1.24 + || DumpSharedSpaces ) { 1.25 // We do not care what kind of exception we get for the vm-thread or a thread which 1.26 // is compiling. We just install a dummy exception object 1.27 + // 1.28 + // We also cannot throw a proper exception when dumping, because we cannot run 1.29 + // Java bytecodes now. A dummy exception will suffice. 1.30 thread->set_pending_exception(Universe::vm_exception(), file, line); 1.31 return true; 1.32 }