From ad347469d7fef147794fa91d72060418bcc898d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E4=B8=80=E9=B8=A3?= Date: Fri, 10 Jan 2025 10:40:05 +0800 Subject: [PATCH 1/2] Enable stack protection for compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蔡一鸣 --- memorytracker/hdi_service/BUILD.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/memorytracker/hdi_service/BUILD.gn b/memorytracker/hdi_service/BUILD.gn index 09cdda15b..210e6d97c 100644 --- a/memorytracker/hdi_service/BUILD.gn +++ b/memorytracker/hdi_service/BUILD.gn @@ -26,6 +26,10 @@ ohos_shared_library("libmemory_tracker_interface_service_1.0") { "ipc:ipc_single", ] + cflags = [ + "-fstack-protector-all" + ] + install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_memorytracker" -- Gitee From 4f1f09fbd58584a2046c3af4bc4e5979072097bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E4=B8=80=E9=B8=A3?= Date: Fri, 10 Jan 2025 02:47:43 +0000 Subject: [PATCH 2/2] update memorytracker/hdi_service/BUILD.gn. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蔡一鸣 --- memorytracker/hdi_service/BUILD.gn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memorytracker/hdi_service/BUILD.gn b/memorytracker/hdi_service/BUILD.gn index 210e6d97c..0db7d2cd4 100644 --- a/memorytracker/hdi_service/BUILD.gn +++ b/memorytracker/hdi_service/BUILD.gn @@ -26,7 +26,7 @@ ohos_shared_library("libmemory_tracker_interface_service_1.0") { "ipc:ipc_single", ] - cflags = [ + cflags_cc = [ "-fstack-protector-all" ] -- Gitee