Downgrade another duplicate method DCHECK to WARNING
This DCHECK got missed when writing change
'Ib26f30718726a9064056855192cef302f3df1eeb'. This is also caused by
duplicate methods in dex files causing some ArtMethod's to appear in
vtables more than once.
Bug: 32549051
Bug: 32546154
Bug: 36446088
Bug: 36399552
Test: ./test/testrunner/testrunner.py --host -j40
Change-Id: Id8ef07d7185958a91f008c2297db96c090dbecd7
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index f936db9..3c18704 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -6723,10 +6723,11 @@
ArtMethod* m = check_vtable->GetElementPtrSize<ArtMethod*>(i, pointer_size);
CHECK(m != nullptr);
- CHECK_EQ(m->GetMethodIndexDuringLinking(), i)
- << m->PrettyMethod()
- << " has an unexpected method index for its spot in the vtable for class"
- << klass->PrettyClass();
+ if (m->GetMethodIndexDuringLinking() != i) {
+ LOG(WARNING) << m->PrettyMethod()
+ << " has an unexpected method index for its spot in the vtable for class"
+ << klass->PrettyClass();
+ }
ArraySlice<ArtMethod> virtuals = klass->GetVirtualMethodsSliceUnchecked(pointer_size);
auto is_same_method = [m] (const ArtMethod& meth) {
return &meth == m;