summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_driver.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/driver/compiler_driver.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/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index c2b837512c..1698464280 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -2345,6 +2345,13 @@ CompiledMethod* CompilerDriver::GetCompiledMethod(MethodReference ref) const {
return it->second;
}
+bool CompilerDriver::IsMethodVerifiedWithoutFailures(uint32_t method_idx,
+ const DexFile& dex_file) const {
+ MethodReference method_ref(&dex_file, method_idx);
+ const VerifiedMethod* verified_method = GetVerificationResults()->GetVerifiedMethod(method_ref);
+ return (verified_method != nullptr) && !verified_method->HasVerificationFailures();
+}
+
size_t CompilerDriver::GetNonRelativeLinkerPatchCount() const {
MutexLock mu(Thread::Current(), compiled_methods_lock_);
return non_relative_linker_patch_count_;