summaryrefslogtreecommitdiffstats
path: root/runtime/mirror/dex_cache-inl.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2014-07-30 18:59:05 -0700
committerAndreas Gampe <agampe@google.com>2014-07-30 20:38:55 -0700
commitaa910d5ef43256102809e397de305c23f1c315e6 (patch)
treeffd2bae0a66e2f174fabc4e8c1062038e5b5dccc /runtime/mirror/dex_cache-inl.h
parentda4a1264cd7d5db9ed01cfd1eeaed71cb11c6c71 (diff)
downloadandroid_art-aa910d5ef43256102809e397de305c23f1c315e6.tar.gz
android_art-aa910d5ef43256102809e397de305c23f1c315e6.tar.bz2
android_art-aa910d5ef43256102809e397de305c23f1c315e6.zip
ART: Fix verifier mishandling erroneous array component types
The verifier must not assume that component types are not erroneous. Bug: 16661259 Change-Id: I23b2f517259ca9c0b8a1aa38f6348fcd61e0b22e
Diffstat (limited to 'runtime/mirror/dex_cache-inl.h')
-rw-r--r--runtime/mirror/dex_cache-inl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h
index 08cff999b1..d3fcb550c6 100644
--- a/runtime/mirror/dex_cache-inl.h
+++ b/runtime/mirror/dex_cache-inl.h
@@ -19,6 +19,8 @@
#include "dex_cache.h"
+#include "base/logging.h"
+#include "mirror/class.h"
#include "runtime.h"
namespace art {
@@ -41,6 +43,12 @@ inline ArtMethod* DexCache::GetResolvedMethod(uint32_t method_idx)
}
}
+inline void DexCache::SetResolvedType(uint32_t type_idx, Class* resolved) {
+ // TODO default transaction support.
+ DCHECK(resolved == nullptr || !resolved->IsErroneous());
+ GetResolvedTypes()->Set(type_idx, resolved);
+}
+
} // namespace mirror
} // namespace art