Skip to content

Commit 482a1c6

Browse files
committed
improved sanitizer settings
1 parent 60cff39 commit 482a1c6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ cmake -B build/application/default/debug \
293293
-DCMAKE_TOOLCHAIN_FILE=build/application/default/debug/conan_toolchain.cmake \
294294
-DCMAKE_BUILD_TYPE=Debug \
295295
-DBUILD_LIBRARY=ON -DBUILD_APPLICATION=ON \
296-
-DSANITIZE_ADDRESS=ON
296+
-DSANITIZER_MODE=3 # ASAN + UBSAN
297297

298298
# With Link-Time Optimization (Release builds)
299299
cmake -B build/application/default/release \
@@ -357,7 +357,18 @@ option(ENABLE_CCACHE "Use ccache compiler cache" ON)
357357
option(ENABLE_COVERAGE "Enable code coverage analysis" OFF)
358358
option(ENABLE_IPO "Enable link-time optimization" OFF)
359359
option(ENABLE_HARDENING "Enable security hardening" OFF)
360-
option(SANITIZE_ADDRESS "Enable address sanitizer" OFF)
360+
361+
# Sanitizer configuration (compatible combinations only)
362+
# SANITIZER_MODE values:
363+
# 0 = None - No sanitizers
364+
# 1 = ASAN - Address Sanitizer
365+
# 2 = UBSAN - Undefined Behavior Sanitizer
366+
# 3 = ASAN + UBSAN - Address + Undefined
367+
# 4 = TSAN - Thread Sanitizer
368+
# 5 = TSAN + UBSAN - Thread + Undefined
369+
# 6 = MSAN - Memory Sanitizer (Clang only)
370+
# 7 = MSAN + UBSAN - Memory + Undefined (Clang only)
371+
set(SANITIZER_MODE 0 CACHE STRING "Sanitizer mode (0-7)")
361372
```
362373

363374
---

0 commit comments

Comments
 (0)