From e7441631a11e2e07ce863255a59ee4de29c6a56f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Wed, 29 Nov 2017 13:00:56 +0000 Subject: Revert "Revert "JIT JNI stubs."" The original CL, https://android-review.googlesource.com/513417 , had a bug for class unloading where a read barrier was executed at the wrong time from ConcurrentCopying::MarkingPhase() -> ClassLinker::CleanupClassLoaders() -> ClassLinker::DeleteClassLoader() -> JitCodeCache::RemoveMethodsIn() -> JitCodeCache::JniStubKey::UpdateShorty() -> ArtMethod::GetShorty(). This has been fixed by removing sources of the read barrier from ArtMethod::GetShorty(). Test: testrunner.py --host --prebuild --jit --no-relocate \ --no-image -t 998-redefine-use-after-free Bug: 65574695 Bug: 69843562 This reverts commit 47d31853e16a95393d760e6be2ffeeb0193f94a1. Change-Id: I06e7a15b09d9ff11cde15a7d1529644bfeca15e0 --- runtime/entrypoints/entrypoint_utils.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils.cc') diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index 2bf4372b1f..f3450da306 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -245,7 +245,7 @@ ArtMethod* GetCalleeSaveMethodCaller(ArtMethod** sp, CalleeSaveType type, bool d CallerAndOuterMethod GetCalleeSaveMethodCallerAndOuterMethod(Thread* self, CalleeSaveType type) { CallerAndOuterMethod result; ScopedAssertNoThreadSuspension ants(__FUNCTION__); - ArtMethod** sp = self->GetManagedStack()->GetTopQuickFrame(); + ArtMethod** sp = self->GetManagedStack()->GetTopQuickFrameKnownNotTagged(); auto outer_caller_and_pc = DoGetCalleeSaveMethodOuterCallerAndPc(sp, type); result.outer_method = outer_caller_and_pc.first; uintptr_t caller_pc = outer_caller_and_pc.second; @@ -256,7 +256,7 @@ CallerAndOuterMethod GetCalleeSaveMethodCallerAndOuterMethod(Thread* self, Calle ArtMethod* GetCalleeSaveOuterMethod(Thread* self, CalleeSaveType type) { ScopedAssertNoThreadSuspension ants(__FUNCTION__); - ArtMethod** sp = self->GetManagedStack()->GetTopQuickFrame(); + ArtMethod** sp = self->GetManagedStack()->GetTopQuickFrameKnownNotTagged(); return DoGetCalleeSaveMethodOuterCallerAndPc(sp, type).first; } -- cgit v1.2.3-59-g8ed1b