Skip to content

Commit

Permalink
adding remark about sensitivity and removing duplicate option #2
Browse files Browse the repository at this point in the history
  • Loading branch information
behrisch committed Mar 23, 2024
1 parent 7af9a69 commit 7179ae7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,10 @@ endif ()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
if (CLANG_COMPILER)
if (WIN32)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined,integer,unsigned-integer-overflow -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build_config/clang_sanitize_blacklist.txt")
# set iterator de bug level in 0
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined,integer -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build_config/clang_sanitize_blacklist.txt")
add_compile_definitions(_ITERATOR_DEBUG_LEVEL=0)
else ()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined,address,integer,unsigned-integer-overflow -fno-omit-frame-pointer -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build_config/clang_sanitize_blacklist.txt")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=undefined,address,integer -fno-omit-frame-pointer -fsanitize-blacklist=${CMAKE_SOURCE_DIR}/build_config/clang_sanitize_blacklist.txt")
endif ()
endif ()

Expand Down
7 changes: 6 additions & 1 deletion docs/web/docs/Installing/Linux_Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ Our current clang configuration for additional static code checking
enables the following CXXFLAGS:

```
-stdlib=libstdc++ -fsanitize=undefined,address,integer,unsigned-integer-overflow -fno-omit-frame-pointer -fsanitize-blacklist=$SUMO_HOME/build_config/clang_sanitize_blacklist.txt
-stdlib=libstdc++ -fsanitize=undefined,address,integer -fno-omit-frame-pointer -fsanitize-blacklist=$SUMO_HOME/build_config/clang_sanitize_blacklist.txt
```

You may of course leave out all the sanitizer-checks you don't want but
Expand All @@ -235,6 +235,11 @@ Indirect leak of 72 byte(s) in 1 object(s) allocated from:
set the following environment variable to point to the llvm-symbolizer executable:
`export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer` before running the executable.

Please note that the undefined behavior checker is very sensitive and will report
some false negatives also in system libraries. It is recommended to use
`export UBSAN_OPTIONS=suppressions=$SUMO_HOME/build_config/clang_ubsan_suppressions.txt`
before calling the executable.

## Installing the SUMO binaries

This (optional) step will copy the SUMO binaries to another path, so
Expand Down

0 comments on commit 7179ae7

Please sign in to comment.