Gracefully handle bogus profiling info for inline caches.

Test: 643-checker-bogus-ic
Bug: 36371709
Change-Id: I2a52ac67a45a6bb5ddefb053a35e6edf5bc2da2f
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h
index b47f8f0..5cf0e0f 100644
--- a/runtime/art_method-inl.h
+++ b/runtime/art_method-inl.h
@@ -32,6 +32,7 @@
 #include "mirror/dex_cache-inl.h"
 #include "mirror/object-inl.h"
 #include "mirror/object_array.h"
+#include "mirror/string.h"
 #include "oat.h"
 #include "obj_ptr-inl.h"
 #include "quick/quick_method_frame_info.h"
@@ -56,8 +57,10 @@
     if (!IsRuntimeMethod()) {
       CHECK(result != nullptr) << this;
       if (kCheckDeclaringClassState) {
-        CHECK(result->IsIdxLoaded() || result->IsErroneous())
-            << result->GetStatus() << " " << result->PrettyClass();
+        if (!(result->IsIdxLoaded() || result->IsErroneous())) {
+          LOG(FATAL_WITHOUT_ABORT) << "Class status: " << result->GetStatus();
+          LOG(FATAL) << result->PrettyClass();
+        }
       }
     } else {
       CHECK(result == nullptr) << this;