From 77738ae4381e3a1038ddd6c61db3ecaf59ffa35f Mon Sep 17 00:00:00 2001 From: fuyongyuan Date: Tue, 26 Aug 2025 21:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E8=83=BDarkweb=E7=9A=84hwasan?= =?UTF-8?q?=E8=83=BD=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fuyongyuan --- appdata-sandbox-asan.json | 20 ++++++++++++++++++++ modules/asan/asan_detector.c | 4 ++++ 2 files changed, 24 insertions(+) diff --git a/appdata-sandbox-asan.json b/appdata-sandbox-asan.json index cfde0075..5acb7e9f 100755 --- a/appdata-sandbox-asan.json +++ b/appdata-sandbox-asan.json @@ -23,6 +23,16 @@ ], "symbol-links" : [ ] + }], + "app-resources" : [{ + "mount-paths" : [{ + "src-path" : "/data/app/el1/bundle/public/com.huawei.hmos.arkwebcore_asan", + "sandbox-path" : "data/storage/el1/bundle/arkwebcore_asan", + "sandbox-flags" : [ "bind", "rec" ], + "check-action-status": "fasle" + }], + "symbol-links" : [ + ] }] }], "individual" : [{ @@ -54,6 +64,11 @@ "sandbox-path" : "/system/asan/bin", "sandbox-flags" : [ "bind", "rec" ], "check-action-status": "false" + }, { + "src-path" : "/data/app/el1/bundle/public/com.huawei.hmos.arkwebcore_asan", + "sandbox-path" : "data/storage/el1/bundle/arkwebcore_asan", + "sandbox-flags" : [ "bind", "rec" ], + "check-action-status": "false" } ], "symbol-links" : [ @@ -87,6 +102,11 @@ "sandbox-path" : "/system/asan/bin", "sandbox-flags" : [ "bind", "rec" ], "check-action-status": "false" + }, { + "src-path" : "/data/app/el1/bundle/public/com.huawei.hmos.arkwebcore_asan", + "sandbox-path" : "data/storage/el1/bundle/arkwebcore_asan", + "sandbox-flags" : [ "bind", "rec" ], + "check-action-status": "false" } ], "symbol-links" : [ diff --git a/modules/asan/asan_detector.c b/modules/asan/asan_detector.c index 25212c6c..6e96b714 100644 --- a/modules/asan/asan_detector.c +++ b/modules/asan/asan_detector.c @@ -176,6 +176,10 @@ static int AsanSpawnInitSpawningEnv(AppSpawnMgr *content, AppSpawningCtx *proper APPSPAWN_LOGI("SetAsanEnabledEnv cold start app %{public}s", GetProcessName(property)); property->client.flags |= APP_COLD_START; } +#else + if (CheckSupportColdStart(GetBundleName(property)) == 0) { + setenv("COLDSTART_ASAN_ENABLE", "TRUE", 1); + } #endif (void)SetGwpAsanEnabled(content, property); return 0; -- Gitee