diff --git a/CMakeLists.txt b/CMakeLists.txt index 0025fd501..2468f2fd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Makefile b/Makefile index 8f52ef433..4ab4a6cf2 100644 --- a/Makefile +++ b/Makefile @@ -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" \