summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2017-11-22 14:13:00 -0800
committer Andreas Gampe <agampe@google.com> 2017-11-22 14:13:00 -0800
commitd278cb48e91bf06f325663a14f026608cc904355 (patch)
treeeb8302a386622935268637d9edfff24bf1de5fb5 /compiler/driver/compiler_driver.cc
parent71bb96894228c1e2408ccaea0c42159b5f550336 (diff)
ART: Remove implicit boot image error aborts
There are now explicit arguments that induce the same invariants. Move the configuration to the build system. This allows certain configurations to disable these checks. WARNING: Disabling the checks is highly discouraged. Bug: 69106371 Test: m Change-Id: I63e915005fcda588b223ec60ef8c9db28d42e577
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc29
1 files changed, 10 insertions, 19 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 726401d09e..e4dd544890 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2025,28 +2025,19 @@ class VerifyClassVisitor : public CompilationVisitor {
ClassReference ref(manager_->GetDexFile(), class_def_index);
manager_->GetCompiler()->RecordClassStatus(ref, klass->GetStatus());
- // It is *very* problematic if there are verification errors in the boot classpath.
- // For example, we rely on things working OK without verification when the decryption dialog
- // is brought up. So abort in a debug build if we find this violated.
+ // It is *very* problematic if there are resolution errors in the boot classpath.
+ //
+ // It is also bad if classes fail verification. For example, we rely on things working
+ // OK without verification when the decryption dialog is brought up. It is thus highly
+ // recommended to compile the boot classpath with
+ // --abort-on-hard-verifier-error --abort-on-soft-verifier-error
+ // which is the default build system configuration.
if (kIsDebugBuild) {
if (manager_->GetCompiler()->GetCompilerOptions().IsBootImage()) {
- if (!klass->IsVerified()) {
- // Re-run verification to get all failure messages if it soft-failed.
- if (!klass->IsErroneous()) {
- gLogVerbosity.verifier = true;
- // Note: We can't call ClassLinker::VerifyClass, as it will elide the second
- // verification.
- Runtime* runtime = Runtime::Current();
- std::string v_error;
- verifier::MethodVerifier::VerifyClass(soa.Self(),
- klass.Get(),
- runtime->GetCompilerCallbacks(),
- runtime->IsAotCompiler(),
- verifier::HardFailLogMode::kLogInternalFatal,
- &v_error);
- }
+ if (!klass->IsResolved() || klass->IsErroneous()) {
LOG(FATAL) << "Boot classpath class " << klass->PrettyClass()
- << " failed to fully verify: state= " << klass->GetStatus();
+ << " failed to resolve/is erroneous: state= " << klass->GetStatus();
+ UNREACHABLE();
}
}
if (klass->IsVerified()) {