From 44021ef1cc9f17d787855258678d924f99e7fd8f Mon Sep 17 00:00:00 2001 From: zhaosy Date: Thu, 2 Mar 2023 10:07:53 +0800 Subject: [PATCH] [M108 Aura Migration] Fix crash with memory sanitizer With memory sanitizer or some utility, there can be another thread, which is created for their purpose. i.e.) With VD duma, libduma makes an agent thread as static variable before ZygoteMain() is called. efl_webprocess(5483)---{duma_comm}(5497) Referenece: https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/252992/ Change-Id: I5da2bf0e8eaa8632790d9f0bcb2b6f426d0f621c Signed-off-by: zhaosy --- content/zygote/zygote_main_linux.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc index 4f2383d..8525df0 100644 --- a/content/zygote/zygote_main_linux.cc +++ b/content/zygote/zygote_main_linux.cc @@ -159,8 +159,15 @@ static void EnterLayerOneSandbox(sandbox::policy::SandboxLinux* linux_sandbox, // It's not just our code which may do so - some system-installed libraries // are known to be culprits, e.g. lttng. #if !defined(THREAD_SANITIZER) +#if BUILDFLAG(IS_TIZEN) + // With memory sanitizer or something utility enabled, there can be another + // thread created for its purpose. + // i.e. VD DUMA makes 'duma_comm' thread for communication with host PC. + DCHECK(sandbox::ThreadHelpers::IsSingleThreaded()); +#else CHECK(sandbox::ThreadHelpers::IsSingleThreaded()); #endif +#endif sandbox::SetuidSandboxClient* setuid_sandbox = linux_sandbox->setuid_sandbox_client(); -- 2.7.4