Skip to content

Commit

Permalink
8294580: frame::interpreter_frame_print_on() crashes if free BasicObj…
Browse files Browse the repository at this point in the history
…ectLock exists in frame

Reviewed-by: mdoerr
Backport-of: bdb4ed0fb136e9e5391cfa520048de6b7f83067d
  • Loading branch information
reinrich committed Dec 15, 2022
1 parent 01f5a19 commit 3f66b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ void frame::interpreter_frame_print_on(outputStream* st) const {
for (BasicObjectLock* current = interpreter_frame_monitor_end();
current < interpreter_frame_monitor_begin();
current = next_monitor_in_interpreter_frame(current)) {
st->print(" - obj [");
current->obj()->print_value_on(st);
st->print(" - obj [%s", current->obj() == NULL ? "null" : "");
if (current->obj() != NULL) current->obj()->print_value_on(st);
st->print_cr("]");
st->print(" - lock [");
current->lock()->print_on(st);
Expand Down

1 comment on commit 3f66b16

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.