1
mirror of https://github.com/neovim/neovim.git synced 2025-01-01 17:23:36 -07:00

ci: Try to recover from sanitizer issues

When running in CI, we want to find as many problems as possible
instead.  Let the code try to keep running from recoverable issues so we
report all the sanitize issues we can.
This commit is contained in:
James McCoy 2020-09-04 11:09:25 -04:00
parent 74ad66404f
commit 33bf6f9ada
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -624,9 +624,19 @@ if(CLANG_ASAN_UBSAN)
message(STATUS "Enabling Clang address sanitizer and undefined behavior sanitizer for nvim.")
check_c_compiler_flag(-fno-sanitize-recover=all SANITIZE_RECOVER_ALL)
if(SANITIZE_RECOVER_ALL)
set(SANITIZE_RECOVER -fno-sanitize-recover=all) # Clang 3.6+
if(TRAVIS_CI_BUILD)
# Try to recover from all sanitize issues so we get reports about all failures
set(SANITIZE_RECOVER -fsanitize-recover=all) # Clang 3.6+
else()
set(SANITIZE_RECOVER -fno-sanitize-recover=all) # Clang 3.6+
endif()
else()
set(SANITIZE_RECOVER -fno-sanitize-recover) # Clang 3.5-
if(TRAVIS_CI_BUILD)
# Try to recover from all sanitize issues so we get reports about all failures
set(SANITIZE_RECOVER -fsanitize-recover) # Clang 3.5-
else()
set(SANITIZE_RECOVER -fno-sanitize-recover) # Clang 3.5-
endif()
endif()
set_property(TARGET nvim APPEND PROPERTY COMPILE_DEFINITIONS EXITFREE)
set_property(TARGET nvim APPEND PROPERTY COMPILE_OPTIONS ${SANITIZE_RECOVER} -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined -fsanitize-blacklist=${PROJECT_SOURCE_DIR}/src/.asan-blacklist)