Improve to-space invariant error reporting in the CC collector.
In particular, distinguish references in an unused region from
the region space (which should never be encountered) from a
reference in a non-moving space.
Test: art/test/testrunner/testrunner.py
Bug: 72758079
Bug: 73004523
Change-Id: Iac632ae71dce9a36b33c14586eeb709dc2d7e7ce
diff --git a/runtime/mirror/object-inl.h b/runtime/mirror/object-inl.h
index 6e2a07c..9685488 100644
--- a/runtime/mirror/object-inl.h
+++ b/runtime/mirror/object-inl.h
@@ -160,7 +160,8 @@
template<VerifyObjectFlags kVerifyFlags>
inline bool Object::InstanceOf(ObjPtr<Class> klass) {
DCHECK(klass != nullptr);
- DCHECK(GetClass<kVerifyNone>() != nullptr);
+ DCHECK(GetClass<kVerifyNone>() != nullptr)
+ << "this=" << std::hex << reinterpret_cast<uintptr_t>(this) << std::dec;
return klass->IsAssignableFrom(GetClass<kVerifyFlags>());
}