summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-06-07 21:35:46 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-07 21:35:47 +0000
commitb362cdcf2cec5847bb0a0b96e52d02c0a413a0e5 (patch)
treefa3e60727a6eaf7b187d8f5332fb7e5c0d3e9494 /runtime
parent4f03acef5c12934518bb9fb5ade8ff39de1561fc (diff)
parent0fc16a09b4d2323f9c2b6aabc81ce120b278329b (diff)
downloadart-b362cdcf2cec5847bb0a0b96e52d02c0a413a0e5.zip
art-b362cdcf2cec5847bb0a0b96e52d02c0a413a0e5.tar.gz
art-b362cdcf2cec5847bb0a0b96e52d02c0a413a0e5.tar.bz2
Merge "Revert "Revert "Turn off duplicate-classes checking""" into mnc-dev
Diffstat (limited to 'runtime')
-rw-r--r--runtime/class_linker.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 79c5a08..2a0e4e8 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -85,6 +85,9 @@ namespace art {
static constexpr bool kSanityCheckObjects = kIsDebugBuild;
+// For b/21333911.
+static constexpr bool kDuplicateClassesCheck = false;
+
static void ThrowNoClassDefFoundError(const char* fmt, ...)
__attribute__((__format__(__printf__, 1, 2)))
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
@@ -840,6 +843,10 @@ const OatFile* ClassLinker::GetPrimaryOatFile() {
// the two elements agree on whether their dex file was from an already-loaded oat-file or the
// new oat file. Any disagreement indicates a collision.
bool ClassLinker::HasCollisions(const OatFile* oat_file, std::string* error_msg) {
+ if (!kDuplicateClassesCheck) {
+ return false;
+ }
+
// Dex files are registered late - once a class is actually being loaded. We have to compare
// against the open oat files. Take the dex_lock_ that protects oat_files_ accesses.
ReaderMutexLock mu(Thread::Current(), dex_lock_);