From c044ec12af0c5a7a828082221236a4712b484718 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=93=E4=BB=A3=E6=98=8E?= Date: Tue, 19 Dec 2023 10:48:46 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=9C=AA=E5=B1=8F=E8=94=BDCF?= =?UTF-8?q?I=E5=AF=BC=E8=87=B4crash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 邓代明 --- frameworks/js/napi/client/cfi_blocklist.txt | 5 ++++- services/engine/BUILD.gn | 7 +++++++ services/engine/cfi_blocklist.txt | 15 +++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 services/engine/cfi_blocklist.txt diff --git a/frameworks/js/napi/client/cfi_blocklist.txt b/frameworks/js/napi/client/cfi_blocklist.txt index ccd00cd0..2ec7a7ee 100644 --- a/frameworks/js/napi/client/cfi_blocklist.txt +++ b/frameworks/js/napi/client/cfi_blocklist.txt @@ -12,4 +12,7 @@ # limitations under the License. [cfi] -src:*session_manager.cpp \ No newline at end of file +type:*OHOS::UpdateEngine::IUpdater* +src:*session_manager.cpp +src:*update_moudle.cpp +src:*napi_session.cpp \ No newline at end of file diff --git a/services/engine/BUILD.gn b/services/engine/BUILD.gn index 1e326459..e33a1e6d 100644 --- a/services/engine/BUILD.gn +++ b/services/engine/BUILD.gn @@ -29,6 +29,13 @@ ohos_prebuilt_etc("updater_sa.cfg") { } ohos_shared_library("$updateengine_library_name") { + sanitize = { + cfi = true + cfi_cross_dso = true + debug = false + blocklist = "./cfi_blocklist.txt" + } + shlib_type = "sa" include_dirs = sa_include_dirs sources = sa_sources diff --git a/services/engine/cfi_blocklist.txt b/services/engine/cfi_blocklist.txt new file mode 100644 index 00000000..4b066779 --- /dev/null +++ b/services/engine/cfi_blocklist.txt @@ -0,0 +1,15 @@ +# Copyright (C) 2022-2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[cfi] +src:*progress_thread.cpp \ No newline at end of file -- Gitee