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

!14932 support cross dso cfi

Merge pull request !14932 from yinchuang/support_open_cross_dso_cfi
...@@ -65,6 +65,7 @@ ohos_shared_library("helloworld") { ...@@ -65,6 +65,7 @@ ohos_shared_library("helloworld") {
# Sanitizer variables # Sanitizer variables
cfi = [boolean] cfi = [boolean]
cfi_cross_dso = [boolean] # CFI: shared library support.
scs = [boolean] scs = [boolean]
scudo = [] scudo = []
ubsan = [] ubsan = []
...@@ -106,6 +107,7 @@ ohos_static_library("helloworld") { ...@@ -106,6 +107,7 @@ ohos_static_library("helloworld") {
# Sanitizer variables # Sanitizer variables
cfi = [boolean] cfi = [boolean]
cfi_cross_dso = [boolean] # CFI: shared library support.
scs = [boolean] scs = [boolean]
scudo = [] scudo = []
ubsan = [] ubsan = []
...@@ -138,6 +140,7 @@ ohos_executable("helloworld") { ...@@ -138,6 +140,7 @@ ohos_executable("helloworld") {
# Sanitizer variables # Sanitizer variables
cfi = [boolean] cfi = [boolean]
cfi_cross_dso = [boolean] # CFI: shared library support.
scs = [boolean] scs = [boolean]
scudo = [] scudo = []
ubsan = [] ubsan = []
...@@ -181,6 +184,7 @@ ohos_source_set("helloworld") { ...@@ -181,6 +184,7 @@ ohos_source_set("helloworld") {
# Sanitizer variables # Sanitizer variables
cfi = [boolean] cfi = [boolean]
cfi_cross_dso = [boolean] # CFI: shared library support.
scs = [boolean] scs = [boolean]
scudo = [] scudo = []
ubsan = [] ubsan = []
......
...@@ -72,6 +72,7 @@ Sanitizer configuration example: ...@@ -72,6 +72,7 @@ Sanitizer configuration example:
ohos_shared_library("example") { ohos_shared_library("example") {
sanitize = { sanitize = {
cfi = true cfi = true
cfi_cross_dso = true # CFI: shared library support.
integer_overflow = true integer_overflow = true
debug = true # Optional. The debug mode is disabled by default. debug = true # Optional. The debug mode is disabled by default.
blocklist = "./blocklist.txt" # Optional. Enter the path of the blocklist. blocklist = "./blocklist.txt" # Optional. Enter the path of the blocklist.
......
...@@ -67,6 +67,7 @@ ohos_shared_library("helloworld") { ...@@ -67,6 +67,7 @@ ohos_shared_library("helloworld") {
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] # 控制流完整性检测 cfi = [boolean] # 控制流完整性检测
cfi_cross_dso = [boolean] # 开启跨so调用的控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测 integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测 boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项 ubsan = [boolean] # 部分ubsan选项
...@@ -114,6 +115,7 @@ ohos_static_library("helloworld") { ...@@ -114,6 +115,7 @@ ohos_static_library("helloworld") {
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] # 控制流完整性检测 cfi = [boolean] # 控制流完整性检测
cfi_cross_dso = [boolean] # 开启跨so调用的控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测 integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测 boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项 ubsan = [boolean] # 部分ubsan选项
...@@ -152,6 +154,7 @@ ohos_executable("helloworld") { ...@@ -152,6 +154,7 @@ ohos_executable("helloworld") {
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] # 控制流完整性检测 cfi = [boolean] # 控制流完整性检测
cfi_cross_dso = [boolean] # 开启跨so调用的控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测 integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测 boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项 ubsan = [boolean] # 部分ubsan选项
...@@ -201,6 +204,7 @@ ohos_source_set("helloworld") { ...@@ -201,6 +204,7 @@ ohos_source_set("helloworld") {
sanitize = { sanitize = {
# 各个Sanitizer开关 # 各个Sanitizer开关
cfi = [boolean] # 控制流完整性检测 cfi = [boolean] # 控制流完整性检测
cfi_cross_dso = [boolean] # 开启跨so调用的控制流完整性检测
integer_overflow = [boolean] # 整数溢出检测 integer_overflow = [boolean] # 整数溢出检测
boundary_sanitize = [boolean] # 边界检测 boundary_sanitize = [boolean] # 边界检测
ubsan = [boolean] # 部分ubsan选项 ubsan = [boolean] # 部分ubsan选项
......
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
ohos_shared_library("example") { ohos_shared_library("example") {
sanitize = { sanitize = {
cfi = true # 开启控制流完整性检测 cfi = true # 开启控制流完整性检测
cfi_cross_dso = true # 开启跨so调用的控制流完整性检测
integer_overflow = true # 开启整数溢出检测 integer_overflow = true # 开启整数溢出检测
boundary_sanitize = true # 开启边界检测 boundary_sanitize = true # 开启边界检测
ubsan = true # 开启部分ubsan选项 ubsan = true # 开启部分ubsan选项
...@@ -85,7 +86,7 @@ ...@@ -85,7 +86,7 @@
目前支持开启的Sanitizer: 目前支持开启的Sanitizer:
- 整数溢出排错:unsigned_integer_overflow/signed_integer_overflow/integer_overflow(同时包括无符号和有符号整数溢出两种检查) - 整数溢出排错:unsigned_integer_overflow/signed_integer_overflow/integer_overflow(同时包括无符号和有符号整数溢出两种检查)
- 控制流完整性:cfi - 控制流完整性:cfi、cfi_cross_dso(跨so的cfi检查)
- 边界检测:boundary_sanitize - 边界检测:boundary_sanitize
- 部分未定义行为检测:ubsan(bool,integer-divide-by-zero,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound等编译选项) - 部分未定义行为检测:ubsan(bool,integer-divide-by-zero,return,returns-nonnull-attribute,shift-exponent,unreachable,vla-bound等编译选项)
- 全量未定义行为检测:all_ubsan(全量undefined behavior sanitizer编译选项) - 全量未定义行为检测:all_ubsan(全量undefined behavior sanitizer编译选项)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册