Fix ASAN problems
FindASAN did not look for so version 5 and TSAN referred to ASAN. Disable leak checks for unit tests as some objects always leak, namely servers.
This commit is contained in:
@ -14,6 +14,8 @@ make
|
|||||||
|
|
||||||
if [[ "$cmake_flags" =~ "BUILD_TESTS" ]]
|
if [[ "$cmake_flags" =~ "BUILD_TESTS" ]]
|
||||||
then
|
then
|
||||||
|
# We don't care about memory leaks in the tests (e.g. servers are never freed)
|
||||||
|
export ASAN_OPTIONS=detect_leaks=0
|
||||||
# All tests must pass otherwise the build is considered a failure
|
# All tests must pass otherwise the build is considered a failure
|
||||||
ctest --output-on-failure || exit 1
|
ctest --output-on-failure || exit 1
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# ASAN_FOUND - If AddressSanitizer was found
|
# ASAN_FOUND - If AddressSanitizer was found
|
||||||
# ASAN_LIBRARIES - Path to the libasan library
|
# ASAN_LIBRARIES - Path to the libasan library
|
||||||
|
|
||||||
find_library(ASAN_LIBRARIES NAMES libasan.so.0 libasan.so.1 libasan.so.2 libasan.so.3 libasan.so.4)
|
find_library(ASAN_LIBRARIES NAMES libasan.so.0 libasan.so.1 libasan.so.2 libasan.so.3 libasan.so.4 libasan.so.5)
|
||||||
|
|
||||||
if (ASAN_LIBRARIES)
|
if (ASAN_LIBRARIES)
|
||||||
message(STATUS "Found AddressSanitizer libraries: ${ASAN_LIBRARIES}")
|
message(STATUS "Found AddressSanitizer libraries: ${ASAN_LIBRARIES}")
|
||||||
|
@ -10,5 +10,5 @@ if (TSAN_LIBRARIES)
|
|||||||
message(STATUS "Found ThreadSanitizer libraries: ${TSAN_LIBRARIES}")
|
message(STATUS "Found ThreadSanitizer libraries: ${TSAN_LIBRARIES}")
|
||||||
set(TSAN_FOUND TRUE CACHE INTERNAL "")
|
set(TSAN_FOUND TRUE CACHE INTERNAL "")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Could not find AdressSanitizer")
|
message(STATUS "Could not find ThreadSanitizer")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user