From e9455f61f7e45963c7056b51dbaf8bb42c47454a Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Thu, 15 Aug 2019 20:57:04 +0100 Subject: Clear the boot task at fork. Bug: 119800099 Test: boot, system server doesn't JIT boot classpath methods. Change-Id: I83ba0f8f1c48c810856d333b3b355cae0a11f20f --- runtime/jit/jit.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/jit/jit.cc b/runtime/jit/jit.cc index ad60546a9d..6964a20bdb 100644 --- a/runtime/jit/jit.cc +++ b/runtime/jit/jit.cc @@ -1115,6 +1115,11 @@ ScopedJitSuspend::~ScopedJitSuspend() { } void Jit::PostForkChildAction(bool is_system_server, bool is_zygote) { + // Clear the potential boot tasks inherited from the zygote. + { + MutexLock mu(Thread::Current(), boot_completed_lock_); + tasks_after_boot_.clear(); + } if (is_zygote || Runtime::Current()->IsSafeMode()) { // Delete the thread pool, we are not going to JIT. thread_pool_.reset(nullptr); -- cgit v1.2.3-59-g8ed1b