Skip to content

Commit

Permalink
Use -fsanitize=leak and -fsanitize=undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Dec 30, 2024
1 parent 5197e6b commit 438b5ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ else()
add_compile_options(-Wno-gnu-zero-variadic-macro-arguments)
endif()
if(SANITIZERS)
set(SAN_FLAGS -fsanitize=shift -fsanitize=integer-divide-by-zero
-fsanitize=unreachable -fsanitize=vla-bound
set(SAN_FLAGS -fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=leak
-fsanitize=undefined -fsanitize=unreachable -fsanitize=vla-bound
-fsanitize=signed-integer-overflow -fsanitize=bounds
-fsanitize=object-size -fsanitize=bool -fsanitize=enum
-fsanitize=alignment -fsanitize=null -fsanitize=address)
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ develop:
-Wno-format-nonliteral -Wno-strict-overflow -Wno-unused-but-set-variable \
-Wno-type-limits -Wno-tautological-constant-out-of-range-compare -Wvla \
-D_GLIBCXX_ASSERTIONS \
-fsanitize=shift -fsanitize=integer-divide-by-zero \
-fsanitize=unreachable -fsanitize=vla-bound \
-fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=leak \
-fsanitize=undefined -fsanitize=unreachable -fsanitize=vla-bound \
-fsanitize=signed-integer-overflow -fsanitize=bounds \
-fsanitize=object-size -fsanitize=bool -fsanitize=enum \
-fsanitize=alignment -fsanitize=null -fsanitize=address" \
Expand Down

0 comments on commit 438b5ef

Please sign in to comment.