< prev index next >

src/hotspot/share/gc/shared/collectedHeap.cpp

Print this page
*** 227,11 ***
  
    if (!is_in(object)) {
      return false;
    }
  
!   if (!Metaspace::contains(object->klass_without_asserts())) {
      return false;
    }
  
    return true;
  }
--- 227,13 ---
  
    if (!is_in(object)) {
      return false;
    }
  
!   // With compact headers, we can't safely access the class, due
+   // to possibly forwarded objects.
+   if (!UseCompactObjectHeaders && !Metaspace::contains(object->klass_without_asserts())) {
      return false;
    }
  
    return true;
  }
< prev index next >