diff options
-rw-r--r-- | runtime/class_linker.cc | 17 | ||||
-rw-r--r-- | runtime/entrypoints/quick/quick_trampoline_entrypoints.cc | 3 | ||||
-rw-r--r-- | runtime/mirror/art_method.cc | 12 | ||||
-rw-r--r-- | test/Android.run-test.mk | 30 |
4 files changed, 43 insertions, 19 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc index 3e8dc23c20..5599c212c1 100644 --- a/runtime/class_linker.cc +++ b/runtime/class_linker.cc @@ -3501,19 +3501,14 @@ mirror::ArtMethod* ClassLinker::CreateProxyConstructor(Thread* self, proxy_class->GetDirectMethods(); CHECK_EQ(proxy_direct_methods->GetLength(), 16); mirror::ArtMethod* proxy_constructor = proxy_direct_methods->Get(2); - mirror::ArtMethod* constructor = down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self)); - if (constructor == nullptr) { + // Clone the existing constructor of Proxy (our constructor would just invoke it so steal its + // code_ too) + mirror::ArtMethod* constructor = + down_cast<mirror::ArtMethod*>(proxy_constructor->Clone(self)); + if (constructor == NULL) { CHECK(self->IsExceptionPending()); // OOME. - return nullptr; + return NULL; } - // Make the proxy constructor's code always point to the uninstrumented code. This avoids - // getting a method enter event for the proxy constructor as the proxy constructor doesn't - // have an activation. - bool have_portable_code; - constructor->SetEntryPointFromQuickCompiledCode(GetQuickOatCodeFor(proxy_constructor)); - constructor->SetEntryPointFromPortableCompiledCode(GetPortableOatCodeFor(proxy_constructor, - &have_portable_code)); - // Make this constructor public and fix the class to be our Proxy version constructor->SetAccessFlags((constructor->GetAccessFlags() & ~kAccProtected) | kAccPublic); constructor->SetDeclaringClass(klass.Get()); diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc index fa198d7ef5..49bb65f488 100644 --- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc +++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc @@ -592,7 +592,8 @@ extern "C" uint64_t artQuickProxyInvokeHandler(mirror::ArtMethod* proxy_method, const char* old_cause = self->StartAssertNoThreadSuspension("Adding to IRT proxy object arguments"); // Register the top of the managed stack, making stack crawlable. - DCHECK_EQ(sp->AsMirrorPtr(), proxy_method) << PrettyMethod(proxy_method); + DCHECK_EQ(sp->AsMirrorPtr(), proxy_method) + << PrettyMethod(proxy_method); self->SetTopOfStack(sp, 0); DCHECK_EQ(proxy_method->GetFrameSizeInBytes(), Runtime::Current()->GetCalleeSaveMethod(Runtime::kRefsAndArgs)->GetFrameSizeInBytes()) diff --git a/runtime/mirror/art_method.cc b/runtime/mirror/art_method.cc index c27b2038b8..211ba1dde2 100644 --- a/runtime/mirror/art_method.cc +++ b/runtime/mirror/art_method.cc @@ -158,12 +158,12 @@ ArtMethod* ArtMethod::FindOverriddenMethod() { } } } - if (kIsDebugBuild) { - StackHandleScope<2> hs(Thread::Current()); - MethodHelper result_mh(hs.NewHandle(result)); - MethodHelper this_mh(hs.NewHandle(this)); - DCHECK(result == nullptr || this_mh.HasSameNameAndSignature(&result_mh)); - } +#ifndef NDEBUG + StackHandleScope<2> hs(Thread::Current()); + MethodHelper result_mh(hs.NewHandle(result)); + MethodHelper this_mh(hs.NewHandle(this)); + DCHECK(result == NULL || this_mh.HasSameNameAndSignature(&result_mh)); +#endif return result; } diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk index 1d5e66138d..0f8032e608 100644 --- a/test/Android.run-test.mk +++ b/test/Android.run-test.mk @@ -81,10 +81,38 @@ endif # Tests that are broken in --trace mode. TEST_ART_BROKEN_TRACE_RUN_TESTS := \ + 003-omnibus-opcodes \ + 004-InterfaceTest \ 004-SignalTest \ + 004-ThreadStress \ + 005-annotations \ + 012-math \ 018-stack-overflow \ + 023-many-interfaces \ + 027-arithmetic \ + 031-class-attributes \ + 037-inherit \ + 044-proxy \ + 046-reflect \ + 051-thread \ + 055-enum-performance \ + 062-character-encodings \ + 064-field-access \ + 074-gc-thrash \ + 078-polymorphic-virtual \ + 080-oom-throw \ + 082-inline-execute \ + 083-compiler-regressions \ + 093-serialization \ 097-duplicate-method \ - 107-int-math2 + 100-reflect2 \ + 102-concurrent-gc \ + 103-string-append \ + 107-int-math2 \ + 112-double-math \ + 114-ParallelGC \ + 700-LoadArgRegs \ + 701-easy-div-rem ART_TEST_KNOWN_BROKEN += $(foreach test, $(TEST_ART_BROKEN_TRACE_RUN_TESTS), $(call all-run-test-names,$(test),-trace,-relocate)) ART_TEST_KNOWN_BROKEN += $(foreach test, $(TEST_ART_BROKEN_TRACE_RUN_TESTS), $(call all-run-test-names,$(test),-trace,-no-prebuild)) |