changeset 7946:f21c5c4d5231

8150002: Check for the validity of oop before printing it in verify_remembered_set Summary: Adding missing check for valid oop. Reviewed-by: dcubed Contributed-by: Shafi Ahmad <shafi.s.ahmad@oracle.com>
author aeriksso
date Fri, 11 Mar 2016 11:10:53 +0530
parents b5b3db42efca
children 58fdc4a7c328
files src/share/vm/gc_implementation/g1/heapRegion.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp	Tue Mar 29 23:01:10 2016 +0100
+++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp	Fri Mar 11 11:10:53 2016 +0530
@@ -794,7 +794,9 @@
                                  "in region "HR_FORMAT,
                                  (void*) obj,
                                  HR_FORMAT_PARAMS(to));
-          obj->print_on(gclog_or_tty);
+          if (obj->is_oop()) {
+            obj->print_on(gclog_or_tty);
+          }
           gclog_or_tty->print_cr("Obj head CTE = %d, field CTE = %d.",
                         cv_obj, cv_field);
           gclog_or_tty->print_cr("----------");