From f0972a410a0665dbe32bd96df09a572d69f9f3a3 Mon Sep 17 00:00:00 2001 From: Dmitry Petrochenko Date: Fri, 16 May 2014 17:43:39 +0700 Subject: Fix generic jni issue in ArtMethod::GetQuickFrameInfo The 64-bit host mode fails to start due to incorrect detection of GetQuickGenericJniTrampoline. The quick_code is 32-bit and taken from oat file, but GetQuickGenericJniTrampoline returnf 0x7fffxx (64-bit) address of trampoline and execution went to incorrect way. Some clean-up. Original Author: Dmitry Petrochenko Signed-off-by: Dmitry Petrochenko Signed-off-by: Serguei Katkov Change-Id: I0952443b2a9f6833ad37ec373837ae208681fad7 --- compiler/common_compiler_test.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/common_compiler_test.h') diff --git a/compiler/common_compiler_test.h b/compiler/common_compiler_test.h index 586c442227..7a91e47fb1 100644 --- a/compiler/common_compiler_test.h +++ b/compiler/common_compiler_test.h @@ -130,6 +130,9 @@ static inline InstructionSetFeatures ParseFeatureList(std::string str) { return result; } +// Normally the ClassLinker supplies this. +extern "C" void art_quick_generic_jni_trampoline(mirror::ArtMethod*); + class CommonCompilerTest : public CommonRuntimeTest { public: // Create an OatMethod based on pointers (for unit tests). @@ -217,7 +220,7 @@ class CommonCompilerTest : public CommonRuntimeTest { oat_method.LinkMethod(method); method->SetEntryPointFromInterpreter(interpreter::artInterpreterToInterpreterBridge); } else { - const void* method_code = GetQuickGenericJniTrampoline(); + const void* method_code = reinterpret_cast(art_quick_generic_jni_trampoline); OatFile::OatMethod oat_method = CreateOatMethod(method_code, nullptr); oat_method.LinkMethod(method); -- cgit v1.2.3-59-g8ed1b