open IntSan and BoundSan

Signed-off-by: lushi1202 <lushi@huawei.com>
Change-Id: Idecf1b07ee142b8c8b9728ecdda1e91dc9864e74
This commit is contained in:
lushi1202 2023-05-20 15:12:17 +08:00
parent 5b5b1e7480
commit 0e159d27cc
15 changed files with 121 additions and 4 deletions

View File

@ -46,6 +46,9 @@ declare_args() {
# Disable in OH Core
ace_engine_standard_fonts_enable = true
# Sanitize debug
ace_sanitize_debug = false
}
enable_dump_drawcmd = false

View File

@ -85,6 +85,14 @@ foreach(item, ace_platforms) {
if (platform == "ohos") {
# libace target
ohos_shared_library("libace") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
deps = [ "$ace_root/build:libace_static_ohos" ]
version_script = "libace.map"
part_name = ace_engine_part

View File

@ -19,6 +19,14 @@ template("libace_static") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
deps = [ "$ace_root/frameworks/base:ace_base_$platform" ]
if (enable_ng_build) {

View File

@ -18,6 +18,13 @@ template("ace_base_source_set") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
defines += invoker.defines

View File

@ -19,6 +19,13 @@ template("framework_bridge") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
configs = [ "$ace_root:ace_config" ]
@ -46,6 +53,13 @@ template("framework_bridge_ng") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
configs = [ "$ace_root:ace_config" ]

View File

@ -20,6 +20,13 @@ template("ace_core_source_set") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
defines += invoker.defines
@ -573,6 +580,13 @@ template("ace_core_ng_source_set") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
defines += invoker.defines

View File

@ -17,6 +17,13 @@ template("js_inspector") {
forward_variables_from(invoker, "*")
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
subsystem_name = ace_engine_subsystem
part_name = ace_engine_part
defines += invoker.defines

View File

@ -18,7 +18,14 @@ import("//foundation/arkui/ace_engine/ace_config.gni")
template("ace_core_pipeline_source_set") {
forward_variables_from(invoker, "*")
source_set(target_name) {
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
defines += invoker.defines
# add common source file needed by all product platform here
@ -67,7 +74,7 @@ template("ace_core_pipeline_source_set") {
]
}
configs += [ "$ace_root:ace_config" ]
configs = [ "$ace_root:ace_config" ]
deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ]

View File

@ -19,7 +19,14 @@ import("../../../build/uicast.gni")
template("ace_core_pipeline_ng_source_set") {
forward_variables_from(invoker, "*")
source_set(target_name) {
ohos_source_set(target_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
defines += invoker.defines
defines += uicast_configs.uicast_defines
@ -32,7 +39,7 @@ template("ace_core_pipeline_ng_source_set") {
"ui_task_scheduler.cpp",
]
configs += [ "$ace_root:ace_config" ]
configs = [ "$ace_root:ace_config" ]
deps = [ "$ace_root/frameworks/core/components/theme:build_theme_code" ]

View File

@ -44,6 +44,13 @@ config("uicontent_config") {
}
ohos_shared_library("ace_uicontent") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
public_configs = [ ":uicontent_config" ]
configs = [ "$ace_root:ace_config" ]

View File

@ -28,6 +28,13 @@ config("drawable_config") {
}
ohos_shared_library("drawable_descriptor") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
public_configs = [ ":drawable_config" ]
configs = [ "$ace_root:ace_config" ]

View File

@ -27,6 +27,13 @@ config("form_render_config") {
}
ohos_shared_library("ace_form_render") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
sources = [
"$ace_root/interfaces/inner_api/form_render/src/form_renderer.cpp",
"$ace_root/interfaces/inner_api/form_render/src/form_renderer_delegate_impl.cpp",

View File

@ -40,6 +40,13 @@ config("uiservice_manager_public_config") {
}
ohos_shared_library("ui_service_mgr") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
sources = [
"//foundation/arkui/ace_engine/adapter/ohos/services/uiservice/src/ui_service_mgr_client.cpp",
"//foundation/arkui/ace_engine/adapter/ohos/services/uiservice/src/ui_service_mgr_proxy.cpp",

View File

@ -45,6 +45,13 @@ template("ace_napi_lib") {
module_name = string_replace(module_path, "_", "")
ohos_shared_library(module_name) {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
deps = [ "$ace_root/interfaces/napi/kits/${module_path}:${module_name}_static_${platform}" ]
relative_install_dir = "module" + install_dir

View File

@ -31,6 +31,13 @@ if (!is_cross_platform_build) {
}
ohos_shared_library("ace_ndk") {
if (current_os == "ohos") {
sanitize = {
integer_overflow = true
boundary_sanitize = true
debug = ace_sanitize_debug
}
}
include_dirs = [
"//foundation/arkui/ace_engine",
"//foundation/arkui/ace_engine/frameworks",