summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-17 03:45:51 +0200
committerSven Gothel <[email protected]>2020-10-17 03:45:51 +0200
commit60092e76d213a2347eb1797c5eccb8c2e536af7b (patch)
tree14b204babc589bde869c0a64871c36f9a9b3d0a9 /CMakeLists.txt
parentee805f90779bb331bea623184476836dbf62c28b (diff)
Add DEBUG flag '-fsanitize-address-use-after-scope'
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b524d72f..9182e4a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ set (GCC_FLAGS_WARNING "-Wall -Wextra -Wformat=2 -Wformat-overflow=2 -Wformat-no
# debug only
set (GCC_FLAGS_STACK "-fstack-protector-strong -fstack-check")
# set (GCC_FLAGS_SANITIZE "-fsanitize=undefined -fsanitize=thread")
-set (GCC_FLAGS_SANITIZE "-fsanitize=address -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined -fsanitize=leak")
+set (GCC_FLAGS_SANITIZE "-fsanitize=address -fsanitize-address-use-after-scope -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined -fsanitize=leak")
# -fsanitize=address cannot be combined with -fsanitize=thread
# -fsanitize=pointer-compare -fsanitize=pointer-subtract must be combined with -fsanitize=address
# -fsanitize=thread TSAN's lacks ability to properly handle GCC's atomic macros (like helgrind etc), can't check SC-DRF!