diff options
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r-- | runtime/class_linker.cc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 141df1ec1a..10e0bd28c3 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -4064,7 +4064,10 @@ verifier::FailureKind ClassLinker::VerifyClass( while (old_status == mirror::Class::kStatusVerifying || old_status == mirror::Class::kStatusVerifyingAtRuntime) { lock.WaitIgnoringInterrupts(); - CHECK(klass->IsErroneous() || (klass->GetStatus() > old_status)) + // WaitIgnoringInterrupts can still receive an interrupt and return early, in this + // case we may see the same status again. b/62912904. This is why the check is + // greater or equal. + CHECK(klass->IsErroneous() || (klass->GetStatus() >= old_status)) << "Class '" << klass->PrettyClass() << "' performed an illegal verification state transition from " << old_status << " to " << klass->GetStatus(); @@ -4107,6 +4110,10 @@ verifier::FailureKind ClassLinker::VerifyClass( } } + VLOG(class_linker) << "Beginning verification for class: " + << klass->PrettyDescriptor() + << " in " << klass->GetDexCache()->GetLocation()->ToModifiedUtf8(); + // Verify super class. StackHandleScope<2> hs(self); MutableHandle<mirror::Class> supertype(hs.NewHandle(klass->GetSuperClass())); @@ -4161,6 +4168,13 @@ verifier::FailureKind ClassLinker::VerifyClass( const DexFile& dex_file = *klass->GetDexCache()->GetDexFile(); mirror::Class::Status oat_file_class_status(mirror::Class::kStatusNotReady); bool preverified = VerifyClassUsingOatFile(dex_file, klass.Get(), oat_file_class_status); + + VLOG(class_linker) << "Class preverified status for class " + << klass->PrettyDescriptor() + << " in " << klass->GetDexCache()->GetLocation()->ToModifiedUtf8() + << ": " + << preverified; + // If the oat file says the class had an error, re-run the verifier. That way we will get a // precise error message. To ensure a rerun, test: // mirror::Class::IsErroneous(oat_file_class_status) => !preverified |