summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-07-31 16:23:49 -0700
committerAndreas Gampe <agampe@google.com>2014-08-06 15:57:05 -0700
commit58a5af8568d224ca7eccf2483396ff9862f8d1ee (patch)
tree4dfac17316970040e079244523b9b1e2ea163f05 /runtime/entrypoints/entrypoint_utils.cc
parent1b192268f167f603fc372f02f9067f3ce5d82daf (diff)
downloadandroid_art-58a5af8568d224ca7eccf2483396ff9862f8d1ee.tar.gz
android_art-58a5af8568d224ca7eccf2483396ff9862f8d1ee.tar.bz2
android_art-58a5af8568d224ca7eccf2483396ff9862f8d1ee.zip
ART: Add guards to the dex cache and its shortcuts
Do not return fields, methods or classes if the (declaring) class is erroneous. Bug: 16692788 Change-Id: If43c2414ad0eb22db5eba7cf66396c7f16c26597
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index c1c7631b35..be3895a726 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -41,7 +41,7 @@ static inline mirror::Class* CheckFilledNewArrayAlloc(uint32_t type_idx, mirror:
ThrowNegativeArraySizeException(component_count);
return nullptr; // Failure
}
- mirror::Class* klass = referrer->GetDexCacheResolvedTypes()->GetWithoutChecks(type_idx);
+ mirror::Class* klass = referrer->GetDexCacheResolvedType<false>(type_idx);
if (UNLIKELY(klass == NULL)) { // Not in dex cache so try to resolve
klass = Runtime::Current()->GetClassLinker()->ResolveType(type_idx, referrer);
if (klass == NULL) { // Error