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/gc/verification.cc b/runtime/gc/verification.cc
index d99b377..fb5db11 100644
--- a/runtime/gc/verification.cc
+++ b/runtime/gc/verification.cc
@@ -140,7 +140,7 @@
if (!IsValidHeapObjectAddress(k1)) {
return false;
}
- // k should be class class, take the class again to verify.
+ // `k1` should be class class, take the class again to verify.
// Note that this check may not be valid for the no image space since the class class might move
// around from moving GC.
mirror::Class* k2 = k1->GetClass<kVerifyNone, kWithoutReadBarrier>();