Skip to content

Commit 03ed241

Browse files
committed
fix: disable unsigned integer overflow sanitization in build configurations
1 parent d4034f1 commit 03ed241

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

build-scripts/config_common.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ if (NOT WAMR_BUILD_SANITIZER STREQUAL "")
196196
message(FATAL_ERROR "Unsupported sanitizers: ${INVALID_SANITIZERS}")
197197
endif()
198198
# common flags for all sanitizers
199-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fno-sanitize-recover=all")
199+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fno-omit-frame-pointer -fno-sanitize-recover=all -fno-sanitize=alignment,unsigned-integer-overflow")
200200
if(SANITIZER_FLAGS)
201201
string(REPLACE ";" "," SANITIZER_FLAGS_STR "${SANITIZER_FLAGS}")
202202
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${SANITIZER_FLAGS_STR}")

tests/fuzz/wasm-mutator-fuzz/aot-compiler/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ if(NOT IN_OSS_FUZZ)
7373
-fprofile-instr-generate -fcoverage-mapping
7474
-fno-sanitize-recover=all
7575
-fsanitize=address,undefined
76-
-fsanitize=float-divide-by-zero,unsigned-integer-overflow,local-bounds,nullability
77-
-fno-sanitize=alignment
76+
-fsanitize=float-divide-by-zero,local-bounds,nullability
77+
-fno-sanitize=alignment,unsigned-integer-overflow
7878
)
7979
target_link_options(aotclib PUBLIC -fsanitize=address,undefined -fprofile-instr-generate)
8080
endif()

tests/fuzz/wasm-mutator-fuzz/wasm-mutator/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ if(NOT IN_OSS_FUZZ)
6363
-fprofile-instr-generate -fcoverage-mapping
6464
-fno-sanitize-recover=all
6565
-fsanitize=address,undefined
66-
-fsanitize=float-divide-by-zero,unsigned-integer-overflow,local-bounds,nullability
67-
-fno-sanitize=alignment
66+
-fsanitize=float-divide-by-zero,local-bounds,nullability
67+
-fno-sanitize=alignment,unsigned-integer-overflow
6868
)
6969
target_link_options(vmlib PUBLIC -fsanitize=address,undefined -fprofile-instr-generate)
7070
endif()

0 commit comments

Comments
 (0)