Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
/ lanai Public archive

Commit 5f67125

Browse files
author
Gerard Ziemski
committedJun 2, 2020
8245509: Crash handler itself crashes when reporting Unsafe.putInt(0) crash
Added ResourceMarker Reviewed-by: coleenp, dholmes
1 parent f6ad22f commit 5f67125

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/hotspot/share/utilities/vmError.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,8 @@ void VMError::report(outputStream* st, bool _verbose) {
776776
STEP("printing register info")
777777

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

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

0 commit comments

Comments
 (0)
This repository has been archived.