8138832: CreateCoredumpOnCrash on linux ARM causes assert message to be repeated
Reviewed-by: jwilhelm, mgerdin
This commit is contained in:
parent
e75e2e04f7
commit
def3b63b62
@ -796,7 +796,7 @@ void VMError::report(outputStream* st, bool _verbose) {
|
|||||||
# undef END
|
# undef END
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile jlong VMError::first_error_tid = -1;
|
volatile intptr_t VMError::first_error_tid = -1;
|
||||||
|
|
||||||
// An error could happen before tty is initialized or after it has been
|
// An error could happen before tty is initialized or after it has been
|
||||||
// destroyed. Here we use a very simple unbuffered fdStream for printing.
|
// destroyed. Here we use a very simple unbuffered fdStream for printing.
|
||||||
@ -925,9 +925,9 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
|
|||||||
if (SuppressFatalErrorMessage) {
|
if (SuppressFatalErrorMessage) {
|
||||||
os::abort(CreateCoredumpOnCrash);
|
os::abort(CreateCoredumpOnCrash);
|
||||||
}
|
}
|
||||||
jlong mytid = os::current_thread_id();
|
intptr_t mytid = os::current_thread_id();
|
||||||
if (first_error_tid == -1 &&
|
if (first_error_tid == -1 &&
|
||||||
Atomic::cmpxchg(mytid, &first_error_tid, -1) == -1) {
|
Atomic::cmpxchg_ptr(mytid, &first_error_tid, -1) == -1) {
|
||||||
|
|
||||||
_id = id;
|
_id = id;
|
||||||
_message = message;
|
_message = message;
|
||||||
@ -968,7 +968,7 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
|
|||||||
if (first_error_tid != mytid) {
|
if (first_error_tid != mytid) {
|
||||||
char msgbuf[64];
|
char msgbuf[64];
|
||||||
jio_snprintf(msgbuf, sizeof(msgbuf),
|
jio_snprintf(msgbuf, sizeof(msgbuf),
|
||||||
"[thread " INT64_FORMAT " also had an error]",
|
"[thread " INTX_FORMAT " also had an error]",
|
||||||
mytid);
|
mytid);
|
||||||
out.print_raw_cr(msgbuf);
|
out.print_raw_cr(msgbuf);
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ class VMError : public AllStatic {
|
|||||||
|
|
||||||
// Thread id of the first error. We must be able to handle native thread,
|
// Thread id of the first error. We must be able to handle native thread,
|
||||||
// so use thread id instead of Thread* to identify thread.
|
// so use thread id instead of Thread* to identify thread.
|
||||||
static volatile jlong first_error_tid;
|
static volatile intptr_t first_error_tid;
|
||||||
|
|
||||||
// Core dump status, false if we have been unable to write a core/minidump for some reason
|
// Core dump status, false if we have been unable to write a core/minidump for some reason
|
||||||
static bool coredump_status;
|
static bool coredump_status;
|
||||||
@ -141,9 +141,7 @@ public:
|
|||||||
// check to see if fatal error reporting is in progress
|
// check to see if fatal error reporting is in progress
|
||||||
static bool fatal_error_in_progress() { return first_error_tid != -1; }
|
static bool fatal_error_in_progress() { return first_error_tid != -1; }
|
||||||
|
|
||||||
static jlong get_first_error_tid() {
|
static intptr_t get_first_error_tid() { return first_error_tid; }
|
||||||
return first_error_tid;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_UTILITIES_VMERROR_HPP
|
#endif // SHARE_VM_UTILITIES_VMERROR_HPP
|
||||||
|
Loading…
Reference in New Issue
Block a user