未验证 提交 aa3182a8 编写于 作者: O openharmony_ci 提交者: Gitee

!14346 更新sanitizer信息

Merge pull request !14346 from Harylee/build
......@@ -62,18 +62,21 @@ ohos_shared_library("helloworld") {
part_name = [string] # 必选,所属部件名称
output_dir
# Sanitizer配置,每项都是可选的,默认为false/空
sanitize = {
# 各个Sanitizer开关
cfi = [boolean]
integer_overflow = [boolean]
cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
...
debug = [boolean] # 调测模式
blocklist = [string] # 屏蔽名单路径
}
testonly = [boolean]
license_as_sources = []
license_file = [] # 后缀名是.txt的文件
......@@ -106,18 +109,21 @@ ohos_static_library("helloworld") {
lib_dirs = []
public_configs = []
# Sanitizer配置,每项都是可选的,默认为false/空
sanitize = {
# 各个Sanitizer开关
cfi = [boolean]
integer_overflow = [boolean]
cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
...
debug = [boolean] # 调测模式
blocklist = [string] # 屏蔽名单路径
}
remove_configs = []
no_default_deps = []
license_file = [] # 后缀名是.txt的文件
......@@ -141,18 +147,21 @@ ohos_executable("helloworld") {
] # 这里依赖的模块必须是依赖的部件声明在inner_kits中的模块
ohos_test = []
test_output_dir = []
# Sanitizer配置,每项都是可选的,默认为false/空
sanitize = {
# 各个Sanitizer开关
cfi = [boolean]
integer_overflow = [boolean]
cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
...
debug = [boolean] # 调测模式
blocklist = [string] # 屏蔽名单路径
}
testonly = [boolean]
license_as_sources = []
license_file = [] # 后缀名是.txt的文件
......@@ -187,18 +196,21 @@ ohos_source_set("helloworld") {
external_deps = [ # 跨部件模块依赖定义,
"part_name:module_name", # 定义格式为 "部件名:模块名称"
] # 这里依赖的模块必须是依赖的部件声明在inner_kits中的模块
# Sanitizer配置,每项都是可选的,默认为false/空
sanitize = {
# 各个Sanitizer开关
cfi = [boolean]
integer_overflow = [boolean]
cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
...
debug = [boolean] # 调测模式
blocklist = [string] # 屏蔽名单路径
}
testonly = [boolean]
license_as_sources = []
license_file = []
......
......@@ -68,8 +68,11 @@
``` shell
ohos_shared_library("example") {
sanitize = {
cfi = true
integer_overflow = true
cfi = true # 开启控制流完整性检测
integer_overflow = true # 开启整数溢出检测
boundary_sanitize = true # 开启边界检测
ubsan = true # 开启部分ubsan选项
all_ubsan = true # 开启全量ubsan选项
debug = true # 可选,调测模式,默认是不开启
blocklist = "./blocklist.txt" # 可选,屏蔽名单路径
}
......@@ -83,6 +86,9 @@
- 整数溢出排错:unsigned_integer_overflow/signed_integer_overflow/integer_overflow(同时包括无符号和有符号整数溢出两种检查)
- 控制流完整性:cfi
- 边界检测:boundary_sanitize
- 部分未定义行为检测:ubsan(bool,integer-divide-by-zero,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound等编译选项)
- 全量未定义行为检测:all_ubsan(全量undefined behavior sanitizer编译选项)
**发布、调测模式**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册