src/share/vm/utilities/vmError.cpp

Print this page

        

@@ -503,15 +503,19 @@
        st->cr();
        st->print_cr("#");
      }
   STEP(63, "(printing core file information)")
     st->print("# ");
+    if (CreateCoredumpOnCrash) {
     if (coredump_status) {
       st->print("Core dump written. Default location: %s", coredump_message);
     } else {
       st->print("Failed to write core dump. %s", coredump_message);
     }
+    } else {
+      st->print("CreateCoredumpOnCrash turned off, no core file dumped");
+    }
     st->cr();
     st->print_cr("#");
 
   STEP(65, "(printing bug submit message)")
 

@@ -896,11 +900,11 @@
   static bool out_done = false;         // done printing to standard out
   static bool log_done = false;         // done saving error log
   static bool transmit_report_done = false; // done error reporting
 
   if (SuppressFatalErrorMessage) {
-      os::abort();
+      os::abort(CreateCoredumpOnCrash);
   }
   jlong mytid = os::current_thread_id();
   if (first_error == NULL &&
       Atomic::cmpxchg_ptr(this, &first_error, NULL) == NULL) {
 

@@ -1086,11 +1090,11 @@
     // os::abort() will call abort hooks, try it first.
     static bool skip_os_abort = false;
     if (!skip_os_abort) {
       skip_os_abort = true;
       bool dump_core = should_report_bug(first_error->_id);
-      os::abort(dump_core);
+      os::abort(dump_core && CreateCoredumpOnCrash);
     }
 
     // if os::abort() doesn't abort, try os::die();
     os::die();
   }