Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8245509: Crash handler itself crashes when reporting Unsafe.putInt(0)…
… crash

Added ResourceMarker

Reviewed-by: coleenp, dholmes
  • Loading branch information
Gerard Ziemski committed Jun 2, 2020
1 parent f6ad22f commit 5f67125ba6290bdebd7af589fc2b132f66e39cbe
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/hotspot/share/utilities/vmError.cpp
@@ -776,7 +776,8 @@ void VMError::report(outputStream* st, bool _verbose) {
STEP("printing register info")

// decode register contents if possible
if (_verbose && _context && Universe::is_fully_initialized()) {
if (_verbose && _context && _thread && Universe::is_fully_initialized()) {
ResourceMark rm(_thread);
os::print_register_info(st, _context);
st->cr();
}
@@ -792,7 +793,7 @@ void VMError::report(outputStream* st, bool _verbose) {
STEP("inspecting top of stack")

// decode stack contents if possible
if (_verbose && _context && Universe::is_fully_initialized()) {
if (_verbose && _context && _thread && Universe::is_fully_initialized()) {
frame fr = os::fetch_frame_from_context(_context);
const int slots = 8;
const intptr_t *start = fr.sp();
@@ -801,6 +802,7 @@ void VMError::report(outputStream* st, bool _verbose) {
st->print_cr("Stack slot to memory mapping:");
for (int i = 0; i < slots; ++i) {
st->print("stack at sp + %d slots: ", i);
ResourceMark rm(_thread);
os::print_location(st, *(start + i));
}
}

0 comments on commit 5f67125

Please sign in to comment.