Skip to content

Commit

Permalink
Fixed skupperproject#129: Configure Sanitizers to handle abort() (by …
Browse files Browse the repository at this point in the history
…printing stacktrace)
  • Loading branch information
jiridanek committed Mar 5, 2022
1 parent a843a8c commit eb986d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/RuntimeChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ elseif(RUNTIME_CHECK STREQUAL "asan" OR RUNTIME_CHECK STREQUAL "hwasan")
# `detect_leaks=1` is set by default where it is available; better not to set it conditionally ourselves
# https://github.com/openSUSE/systemd/blob/1270e56526cd5a3f485ae2aba975345c38860d37/docs/TESTING_WITH_SANITIZERS.md
# TODO(DISPATCH-2148) re-enable odr violation detection when Proton linking issue in test-sender is fixed
set(RUNTIME_ASAN_ENV_OPTIONS "detect_odr_violation=0 strict_string_checks=1 detect_stack_use_after_return=1 check_initialization_order=1 strict_init_order=1 detect_invalid_pointer_pairs=2 suppressions=${CMAKE_SOURCE_DIR}/tests/asan.supp")
set(RUNTIME_ASAN_ENV_OPTIONS "detect_odr_violation=0 strict_string_checks=1 detect_stack_use_after_return=1 check_initialization_order=1 strict_init_order=1 detect_invalid_pointer_pairs=2 handle_abort=1 suppressions=${CMAKE_SOURCE_DIR}/tests/asan.supp")
set(RUNTIME_LSAN_ENV_OPTIONS "suppressions=${CMAKE_BINARY_DIR}/tests/lsan.supp")
set(RUNTIME_UBSAN_ENV_OPTIONS "print_stacktrace=1 print_summary=1")

Expand All @@ -150,7 +150,7 @@ elseif(RUNTIME_CHECK STREQUAL "tsan")
endif(TSAN_LIBRARY-NOTFOUND)
message(STATUS "Runtime race checker: gcc/clang thread sanitizer")
set(SANITIZE_FLAGS "-g -fno-omit-frame-pointer -fsanitize=thread")
set(RUNTIME_TSAN_ENV_OPTIONS "history_size=4 second_deadlock_stack=1 suppressions=${CMAKE_SOURCE_DIR}/tests/tsan.supp")
set(RUNTIME_TSAN_ENV_OPTIONS "history_size=4 second_deadlock_stack=1 handle_abort=1 suppressions=${CMAKE_SOURCE_DIR}/tests/tsan.supp")

elseif(RUNTIME_CHECK)
message(FATAL_ERROR "'RUNTIME_CHECK=${RUNTIME_CHECK}' is invalid, valid values: ${runtime_checks}")
Expand Down

0 comments on commit eb986d2

Please sign in to comment.