summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-05-21 15:49:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-21 15:49:29 +0000
commitd58a6deedabf98e7996634bca6d94c6eb2ac3861 (patch)
treef61d9e6fe4a356de7fd1b4ebbd54a74271bbcde7
parentcd572ebedacd4f5a52d5b725287cb0d819f8bd1a (diff)
parentaafcfca5fe545365ef377fff2897b8a908f03e71 (diff)
downloadart-d58a6deedabf98e7996634bca6d94c6eb2ac3861.tar.gz
art-d58a6deedabf98e7996634bca6d94c6eb2ac3861.tar.bz2
art-d58a6deedabf98e7996634bca6d94c6eb2ac3861.zip
Merge "DO NOT MERGE ART: Turn off duplicate-classes checking" into mnc-dev
-rw-r--r--runtime/class_linker.cc7
-rw-r--r--test/Android.run-test.mk5
2 files changed, 12 insertions, 0 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 292f830764..491c910e0c 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -82,6 +82,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_);
@@ -855,6 +858,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_);
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index f6c92318bc..c9e512ed5d 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -256,6 +256,11 @@ ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),
$(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
+# 138-duplicate-classes-check. Turned off temporarily, b/21333911.
+ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
+ $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
+ $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),138-duplicate-classes-check,$(ALL_ADDRESS_SIZES))
+
# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
# Therefore we shouldn't run them in situations where we actually don't have these since they
# explicitly test for them. These all also assume we have an image.