提交 45fb7584 编写于 作者: H Haryslee

fix: update information of sanitizer

Signed-off-by: NHaryslee <lihao189@huawei.com>
Change-Id: I0e3a1ad62194963a77bd52fca79b0bf5e47394b9
上级 423d6cc5
...@@ -66,8 +66,11 @@ ohos_shared_library("helloworld") { ...@@ -66,8 +66,11 @@ ohos_shared_library("helloworld") {
# Sanitizer配置,每项都是可选的,默认为false/空 # Sanitizer配置,每项都是可选的,默认为false/空
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
... ...
debug = [boolean] # 调测模式 debug = [boolean] # 调测模式
...@@ -110,8 +113,11 @@ ohos_static_library("helloworld") { ...@@ -110,8 +113,11 @@ ohos_static_library("helloworld") {
# Sanitizer配置,每项都是可选的,默认为false/空 # Sanitizer配置,每项都是可选的,默认为false/空
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
... ...
debug = [boolean] # 调测模式 debug = [boolean] # 调测模式
...@@ -145,8 +151,11 @@ ohos_executable("helloworld") { ...@@ -145,8 +151,11 @@ ohos_executable("helloworld") {
# Sanitizer配置,每项都是可选的,默认为false/空 # Sanitizer配置,每项都是可选的,默认为false/空
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
... ...
debug = [boolean] # 调测模式 debug = [boolean] # 调测模式
...@@ -191,8 +200,11 @@ ohos_source_set("helloworld") { ...@@ -191,8 +200,11 @@ ohos_source_set("helloworld") {
# Sanitizer配置,每项都是可选的,默认为false/空 # Sanitizer配置,每项都是可选的,默认为false/空
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] cfi = [boolean] # 控制流完整性检测
integer_overflow = [boolean] integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项
all_ubsan = [boolean] # 全量ubsan选项
... ...
debug = [boolean] # 调测模式 debug = [boolean] # 调测模式
......
...@@ -68,8 +68,11 @@ ...@@ -68,8 +68,11 @@
``` shell ``` shell
ohos_shared_library("example") { ohos_shared_library("example") {
sanitize = { sanitize = {
cfi = true cfi = true # 开启控制流完整性检测
integer_overflow = true integer_overflow = true # 开启整数溢出检测
boundary_sanitize = true # 开启边界检测
ubsan = true # 开启部分ubsan选项
all_ubsan = true # 开启全量ubsan选项
debug = true # 可选,调测模式,默认是不开启 debug = true # 可选,调测模式,默认是不开启
blocklist = "./blocklist.txt" # 可选,屏蔽名单路径 blocklist = "./blocklist.txt" # 可选,屏蔽名单路径
} }
...@@ -83,6 +86,9 @@ ...@@ -83,6 +86,9 @@
- 整数溢出排错:unsigned_integer_overflow/signed_integer_overflow/integer_overflow(同时包括无符号和有符号整数溢出两种检查) - 整数溢出排错:unsigned_integer_overflow/signed_integer_overflow/integer_overflow(同时包括无符号和有符号整数溢出两种检查)
- 控制流完整性:cfi - 控制流完整性: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.
先完成此消息的编辑!
想要评论请 注册