From cae8bceadca17f10193cca3dcf7afb815de3ce42 Mon Sep 17 00:00:00 2001 From: aeriksso Date: Fri, 11 Mar 2016 11:10:53 +0530 Subject: [PATCH] 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 --- src/share/vm/gc_implementation/g1/heapRegion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/share/vm/gc_implementation/g1/heapRegion.cpp b/src/share/vm/gc_implementation/g1/heapRegion.cpp index d95d37949..ef5b437a9 100644 --- a/src/share/vm/gc_implementation/g1/heapRegion.cpp +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp @@ -794,7 +794,9 @@ public: "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("----------"); -- GitLab