changeset 53401:3f224e4a891e

8217407: StackValue::print_on() crashes on NULL handle Reviewed-by: kvn
author vlivanov
date Fri, 18 Jan 2019 17:34:43 -0800
parents 6a3586523418
children 456e3870579e
files src/hotspot/share/runtime/stackValue.cpp
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/runtime/stackValue.cpp	Fri Jan 18 17:34:36 2019 -0800
+++ b/src/hotspot/share/runtime/stackValue.cpp	Fri Jan 18 17:34:43 2019 -0800
@@ -206,7 +206,11 @@
       break;
 
     case T_OBJECT:
-      _handle_value()->print_value_on(st);
+      if (_handle_value() != NULL) {
+        _handle_value()->print_value_on(st);
+      } else {
+        st->print("NULL");
+      }
       st->print(" <" INTPTR_FORMAT ">", p2i((address)_handle_value()));
      break;