hotspot/src/os/solaris/vm/os_solaris.cpp
changeset 7692 02c573fae027
parent 7448 11b630d174d5
child 7721 8fae37350972
child 7718 23502bf34686
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp	Tue Dec 14 15:10:52 2010 -0500
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp	Wed Dec 22 11:24:21 2010 -0500
@@ -80,6 +80,7 @@
 // put OS-includes here
 # include <dlfcn.h>
 # include <errno.h>
+# include <exception>
 # include <link.h>
 # include <poll.h>
 # include <pthread.h>
@@ -1475,6 +1476,13 @@
   return &allowdebug_blocked_sigs;
 }
 
+
+void _handle_uncaught_cxx_exception() {
+  VMError err("An uncaught C++ exception");
+  err.report_and_die();
+}
+
+
 // First crack at OS-specific initialization, from inside the new thread.
 void os::initialize_thread() {
   int r = thr_main() ;
@@ -1564,6 +1572,7 @@
    // use the dynamic check for T2 libthread.
 
   os::Solaris::init_thread_fpu_state();
+  std::set_terminate(_handle_uncaught_cxx_exception);
 }