src/share/vm/utilities/vmError.cpp
Print this page
@@ -212,11 +212,11 @@
}
}
out->print_raw_cr("#");
}
-bool VMError::coredump_status;
+bool VMError::coredump_status = true; // presume we can dump core file first
char VMError::coredump_message[O_BUFLEN];
void VMError::report_coredump_status(const char* message, bool status) {
coredump_status = status;
strncpy(coredump_message, message, sizeof(coredump_message));
@@ -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) {
@@ -914,12 +918,12 @@
// User has asked JVM to abort. Reset ShowMessageBoxOnError so the
// WatcherThread can kill JVM if the error handler hangs.
ShowMessageBoxOnError = false;
}
- // Write a minidump on Windows, check core dump limits on Linux/Solaris
- os::check_or_create_dump(_siginfo, _context, buffer, sizeof(buffer));
+ // check core dump limits on Linux/Solaris, nothing on Windows
+ os::check_create_dump_limit(_siginfo, _context, buffer, sizeof(buffer));
// reset signal handlers or exception filter; make sure recursive crashes
// are handled properly.
reset_signal_handlers();
@@ -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, _siginfo, _context);
}
// if os::abort() doesn't abort, try os::die();
os::die();
}