From 88ca8ba34bbf9d355035330572cc1c3624de022c Mon Sep 17 00:00:00 2001 From: Mingyao Yang Date: Tue, 23 May 2017 14:21:07 -0700 Subject: Relax an assert in AssertPcIsWithinQuickCode() Skip the case when pc is jitted code. Bug: 36467228 Test: m -j20 test-art-host-run-test Test: test/run-test --host --prebuild --jit --no-relocate --runtime-option -Xcheck:jni --no-image --64 597-deopt-new-string Change-Id: Ie9c325e2eaf7c81f1769abacc2d2615b1c1c97cb --- runtime/stack.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/stack.cc') diff --git a/runtime/stack.cc b/runtime/stack.cc index 5c6eead34b..4268ba3fa6 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -648,6 +648,12 @@ static void AssertPcIsWithinQuickCode(ArtMethod* method, uintptr_t pc) return; } + Runtime* runtime = Runtime::Current(); + if (runtime->UseJitCompilation() && + runtime->GetJit()->GetCodeCache()->ContainsPc(reinterpret_cast(pc))) { + return; + } + const void* code = method->GetEntryPointFromQuickCompiledCode(); if (code == GetQuickInstrumentationEntryPoint() || code == GetInvokeObsoleteMethodStub()) { return; @@ -659,9 +665,6 @@ static void AssertPcIsWithinQuickCode(ArtMethod* method, uintptr_t pc) return; } - // If we are the JIT then we may have just compiled the method after the - // IsQuickToInterpreterBridge check. - Runtime* runtime = Runtime::Current(); if (runtime->UseJitCompilation() && runtime->GetJit()->GetCodeCache()->ContainsPc(code)) { return; } -- cgit v1.2.3-59-g8ed1b