diff options
| -rw-r--r-- | compiler/optimizing/inliner.cc | 5 | ||||
| -rw-r--r-- | runtime/arch/arm64/instruction_set_features_arm64.cc | 2 | ||||
| -rw-r--r-- | runtime/indirect_reference_table.cc | 1 | ||||
| -rw-r--r-- | runtime/native/java_lang_reflect_Constructor.cc | 15 | ||||
| -rw-r--r-- | test/004-JniTest/src/Main.java | 2 |
5 files changed, 19 insertions, 6 deletions
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 0b65c564f7..f3b5f08c7e 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -43,6 +43,11 @@ namespace art { static constexpr size_t kMaximumNumberOfHInstructions = 12; void HInliner::Run() { + const CompilerOptions& compiler_options = compiler_driver_->GetCompilerOptions(); + if ((compiler_options.GetInlineDepthLimit() == 0) + || (compiler_options.GetInlineMaxCodeUnits() == 0)) { + return; + } if (graph_->IsDebuggable()) { // For simplicity, we currently never inline when the graph is debuggable. This avoids // doing some logic in the runtime to discover if a method could have been inlined. diff --git a/runtime/arch/arm64/instruction_set_features_arm64.cc b/runtime/arch/arm64/instruction_set_features_arm64.cc index 1f2ce02852..395cee8f05 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64.cc +++ b/runtime/arch/arm64/instruction_set_features_arm64.cc @@ -30,7 +30,7 @@ const Arm64InstructionSetFeatures* Arm64InstructionSetFeatures::FromVariant( // Look for variants that need a fix for a53 erratum 835769. static const char* arm64_variants_with_a53_835769_bug[] = { - "default", "generic" // Pessimistically assume all generic ARM64s are A53s. + "default", "generic", "cortex-a53" // Pessimistically assume all generic ARM64s are A53s. }; bool needs_a53_835769_fix = FindVariantInArray(arm64_variants_with_a53_835769_bug, arraysize(arm64_variants_with_a53_835769_bug), diff --git a/runtime/indirect_reference_table.cc b/runtime/indirect_reference_table.cc index c9ba6cfada..a5b63b4271 100644 --- a/runtime/indirect_reference_table.cc +++ b/runtime/indirect_reference_table.cc @@ -17,6 +17,7 @@ #include "indirect_reference_table-inl.h" #include "jni_internal.h" +#include "nth_caller_visitor.h" #include "reference_table.h" #include "runtime.h" #include "scoped_thread_state_change.h" diff --git a/runtime/native/java_lang_reflect_Constructor.cc b/runtime/native/java_lang_reflect_Constructor.cc index e1e9ceb8c6..45b948408e 100644 --- a/runtime/native/java_lang_reflect_Constructor.cc +++ b/runtime/native/java_lang_reflect_Constructor.cc @@ -103,10 +103,17 @@ static jobject Constructor_newInstance(JNIEnv* env, jobject javaMethod, jobjectA // If caller is null, then we called from JNI, just avoid the check since JNI avoids most // access checks anyways. TODO: Investigate if this the correct behavior. if (caller != nullptr && !caller->CanAccess(c.Get())) { - soa.Self()->ThrowNewExceptionF( - "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s", - PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str()); - return nullptr; + if (PrettyDescriptor(c.Get()) == "dalvik.system.DexPathList$Element") { + // b/20699073. + LOG(WARNING) << "The dalvik.system.DexPathList$Element constructor is not accessible by " + "default. This is a temporary workaround for backwards compatibility " + "with class-loader hacks. Please update your application."; + } else { + soa.Self()->ThrowNewExceptionF( + "Ljava/lang/IllegalAccessException;", "%s is not accessible from %s", + PrettyClass(c.Get()).c_str(), PrettyClass(caller).c_str()); + return nullptr; + } } } if (!Runtime::Current()->GetClassLinker()->EnsureInitialized(soa.Self(), c, true, true)) { diff --git a/test/004-JniTest/src/Main.java b/test/004-JniTest/src/Main.java index dd88db0b7c..ee3a3b9830 100644 --- a/test/004-JniTest/src/Main.java +++ b/test/004-JniTest/src/Main.java @@ -120,7 +120,7 @@ public class Main { private static void testRemoveLocalObject() { removeLocalObject(new Object()); } - + private static native short shortMethod(short s1, short s2, short s3, short s4, short s5, short s6, short s7, short s8, short s9, short s10); |