8150002: Check for the validity of oop before printing it in verify_remembered_set
authorpoonam
Thu, 25 Feb 2016 11:27:13 +0530
changeset 36394 fe27b66d3519
parent 36391 3989ccd3f3de
child 36395 12977f0913fd
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>
hotspot/src/share/vm/gc/g1/heapRegion.cpp
--- a/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Wed Mar 02 17:08:40 2016 +0100
+++ b/hotspot/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;