summaryrefslogtreecommitdiff
path: root/compiler/optimizing/inliner.cc
diff options
context:
space:
mode:
author Calin Juravle <calin@google.com> 2015-04-01 20:27:28 +0100
committer Calin Juravle <calin@google.com> 2015-04-10 18:14:42 +0100
commitc751d37e692d89b360f3c09421401f581b5c6d06 (patch)
treee8291a99d7b407ac2dbf0680df0876384821812c /compiler/optimizing/inliner.cc
parent8e5fc53bd2f9ab5a46547959a176eba176ee115f (diff)
Fallback to quick in case of soft verification errors
Add a regression test: using uninitialized values triggers a soft verification error and optimizing should not crash. Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the bug report. Bug: 19988704 Change-Id: I2493f737efd3fad72f6b41fb60eff1d3731613fb
Diffstat (limited to 'compiler/optimizing/inliner.cc')
-rw-r--r--compiler/optimizing/inliner.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 2c17a67867..65f1ed2978 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -31,6 +31,8 @@
#include "ssa_phi_elimination.h"
#include "scoped_thread_state_change.h"
#include "thread.h"
+#include "dex/verified_method.h"
+#include "dex/verification_results.h"
namespace art {
@@ -114,9 +116,10 @@ bool HInliner::TryInline(HInvoke* invoke_instruction,
return false;
}
- if (!resolved_method->GetDeclaringClass()->IsVerified()) {
+ if (compiler_driver_->IsMethodVerifiedWithoutFailures(
+ method_index, *resolved_method->GetDexFile())) {
VLOG(compiler) << "Method " << PrettyMethod(method_index, caller_dex_file)
- << " is not inlined because its class could not be verified";
+ << " has verification failures, so it cannot be inlined";
return false;
}