summaryrefslogtreecommitdiff
path: root/compiler/optimizing/builder.cc
diff options
context:
space:
mode:
author Andreas Gampe <agampe@google.com> 2015-12-03 17:27:32 -0800
committer Andreas Gampe <agampe@google.com> 2015-12-08 08:50:12 -0800
commitdae24142127c64551142a50423085aabdb0a6060 (patch)
tree35c06bc37e2dd2caad4fef1fba4de16a12aad6f9 /compiler/optimizing/builder.cc
parentef45113d01c16102538a8848d6979e772dad6225 (diff)
ART: Check invoke-interface earlier in verifier
Invoke-interface should only be called on an interface method. Move the check earlier, as otherwise we'll try to resolve and potentially inject a method into the dex cache. Also templatize ResolveMethod with a version always checking the invoke type, and on a cache miss check whether type target type is an interface when an interface invoke type was given. Bug: 21869691 Change-Id: Ica27158f675b5aa223d9229248189612f4706832
Diffstat (limited to 'compiler/optimizing/builder.cc')
-rw-r--r--compiler/optimizing/builder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc
index 8e75bdcdc9..2bbf500a98 100644
--- a/compiler/optimizing/builder.cc
+++ b/compiler/optimizing/builder.cc
@@ -744,7 +744,7 @@ ArtMethod* HGraphBuilder::ResolveMethod(uint16_t method_idx, InvokeType invoke_t
soa.Decode<mirror::ClassLoader*>(dex_compilation_unit_->GetClassLoader())));
Handle<mirror::Class> compiling_class(hs.NewHandle(GetCompilingClass()));
- ArtMethod* resolved_method = class_linker->ResolveMethod(
+ ArtMethod* resolved_method = class_linker->ResolveMethod<ClassLinker::kForceICCECheck>(
*dex_compilation_unit_->GetDexFile(),
method_idx,
dex_compilation_unit_->GetDexCache(),