diff options
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 3ac87c5137..ed673d4505 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -3694,7 +3694,8 @@ bool ClassLinker::IsDexFileRegistered(Thread* self, const DexFile& dex_file) { ObjPtr<mirror::DexCache> ClassLinker::FindDexCache(Thread* self, const DexFile& dex_file) { ReaderMutexLock mu(self, *Locks::dex_lock_); - ObjPtr<mirror::DexCache> dex_cache = DecodeDexCache(self, FindDexCacheDataLocked(dex_file)); + DexCacheData dex_cache_data = FindDexCacheDataLocked(dex_file); + ObjPtr<mirror::DexCache> dex_cache = DecodeDexCache(self, dex_cache_data); if (dex_cache != nullptr) { return dex_cache; } @@ -3704,7 +3705,8 @@ ObjPtr<mirror::DexCache> ClassLinker::FindDexCache(Thread* self, const DexFile& LOG(FATAL_WITHOUT_ABORT) << "Registered dex file " << data.dex_file->GetLocation(); } } - LOG(FATAL) << "Failed to find DexCache for DexFile " << dex_file.GetLocation(); + LOG(FATAL) << "Failed to find DexCache for DexFile " << dex_file.GetLocation() + << " " << &dex_file << " " << dex_cache_data.dex_file; UNREACHABLE(); } @@ -4280,13 +4282,7 @@ verifier::FailureKind ClassLinker::VerifyClass( std::string error_msg; verifier::FailureKind verifier_failure = verifier::FailureKind::kNoFailure; if (!preverified) { - Runtime* runtime = Runtime::Current(); - verifier_failure = verifier::MethodVerifier::VerifyClass(self, - klass.Get(), - runtime->GetCompilerCallbacks(), - runtime->IsAotCompiler(), - log_level, - &error_msg); + verifier_failure = PerformClassVerification(self, klass, log_level, &error_msg); } // Verification is done, grab the lock again. @@ -4354,6 +4350,19 @@ verifier::FailureKind ClassLinker::VerifyClass( return verifier_failure; } +verifier::FailureKind ClassLinker::PerformClassVerification(Thread* self, + Handle<mirror::Class> klass, + verifier::HardFailLogMode log_level, + std::string* error_msg) { + Runtime* const runtime = Runtime::Current(); + return verifier::MethodVerifier::VerifyClass(self, + klass.Get(), + runtime->GetCompilerCallbacks(), + runtime->IsAotCompiler(), + log_level, + error_msg); +} + bool ClassLinker::VerifyClassUsingOatFile(const DexFile& dex_file, ObjPtr<mirror::Class> klass, mirror::Class::Status& oat_file_class_status) { |