Log object info for CAS failure
Log extra info to see if the whole object is corrupted or just the
lock word.
Bug: 70146596
Test: test-art-host
Change-Id: I165bed0b85053282878aadb3d961683a217f4019
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index 7beff96..70685bc 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -760,7 +760,8 @@
// Done scanning the object, go back to white.
bool success = obj->AtomicSetReadBarrierState(ReadBarrier::GrayState(),
ReadBarrier::WhiteState());
- CHECK(success);
+ CHECK(success)
+ << Runtime::Current()->GetHeap()->GetVerification()->DumpObjectInfo(obj, "failed CAS");
}
} else {
collector_->ScanImmuneObject(obj);