Merge pull request #61828 from azat/fix-suppressions

Fix sanitizers suppressions
This commit is contained in:
Alexey Milovidov 2024-03-24 21:57:14 +03:00 committed by GitHub
commit 6c8e5ff0cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 7 deletions

View File

@ -30,7 +30,7 @@ if (SANITIZE)
elseif (SANITIZE STREQUAL "thread")
set (TSAN_FLAGS "-fsanitize=thread")
if (COMPILER_CLANG)
set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tests/tsan_suppressions.txt")
set (TSAN_FLAGS "${TSAN_FLAGS} -fsanitize-ignorelist=${PROJECT_SOURCE_DIR}/tests/tsan_ignorelist.txt")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${TSAN_FLAGS}")
@ -48,7 +48,7 @@ if (SANITIZE)
set(UBSAN_FLAGS "${UBSAN_FLAGS} -fno-sanitize=unsigned-integer-overflow")
endif()
if (COMPILER_CLANG)
set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/tests/ubsan_suppressions.txt")
set (UBSAN_FLAGS "${UBSAN_FLAGS} -fsanitize-ignorelist=${PROJECT_SOURCE_DIR}/tests/ubsan_ignorelist.txt")
endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS} ${UBSAN_FLAGS}")

10
tests/tsan_ignorelist.txt Normal file
View File

@ -0,0 +1,10 @@
# Note, this file is ignorelist file [1] not suppressions [2].
#
# [1]: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html
# [2]: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
#
# https://github.com/ClickHouse/ClickHouse/issues/55629
fun:rd_kafka_broker_set_nodename
# https://github.com/ClickHouse/ClickHouse/issues/60443
fun:rd_kafka_stats_emit_all

View File

@ -1,4 +0,0 @@
# https://github.com/ClickHouse/ClickHouse/issues/55629
race:rd_kafka_broker_set_nodename
# https://github.com/ClickHouse/ClickHouse/issues/60443
race:rd_kafka_stats_emit_all

View File

@ -1,4 +1,11 @@
# https://github.com/llvm-mirror/compiler-rt/blob/master/lib/ubsan/ubsan_checks.inc
# Note, this file is ignorelist file [1] not suppressions [2].
#
# [1]: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html
# [2]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#runtime-suppressions
#
# See also [3] for all UBSan checks.
#
# [3]: https://github.com/llvm-mirror/compiler-rt/blob/master/lib/ubsan/ubsan_checks.inc
# Some value is outside the range of representable values of type 'long' on user-provided data inside boost::geometry - ignore.
src:*/Functions/pointInPolygon.cpp