8150002: Check for the validity of oop before printing it in verify_remembered_set

Adding missing check for valid oop.

Reviewed-by: dcubed
This commit is contained in:
Shafi Ahmad 2016-02-25 11:27:13 +05:30 committed by Poonam Bajaj
parent 1f76cb2833
commit a9a432a1a1

View File

@ -781,7 +781,9 @@ public:
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;