changeset 10406:55fe28454251

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 poonam
date Thu, 25 Feb 2016 11:27:13 +0530
parents e0f999893ca8
children b10d60e33756
files src/share/vm/gc/g1/heapRegion.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/heapRegion.cpp	Wed Mar 02 17:08:40 2016 +0100
+++ b/src/share/vm/gc/g1/heapRegion.cpp	Thu Feb 25 11:27:13 2016 +0530
@@ -781,7 +781,9 @@
           ResourceMark rm;
           _containing_obj->print_on(log.error_stream());
           log.error("points to obj " PTR_FORMAT " in region " HR_FORMAT, p2i(obj), HR_FORMAT_PARAMS(to));
-          obj->print_on(log.error_stream());
+          if (obj->is_oop()) {
+            obj->print_on(log.error_stream());
+          }
           log.error("Obj head CTE = %d, field CTE = %d.", cv_obj, cv_field);
           log.error("----------");
           _failures = true;