mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11874 from ethereum/remove-unsigned-overflow-ubsan-nightly
Fix UBSan CI
This commit is contained in:
commit
6f8f58ebb7
@ -200,6 +200,10 @@ if (SANITIZE)
|
||||
elseif (sanitizer STREQUAL "undefined")
|
||||
# The following flags not used by fuzzer but used by us may create problems, so consider
|
||||
# disabling them: alignment, pointer-overflow.
|
||||
# The following flag is not used by us to reduce terminal noise
|
||||
# i.e., warnings printed on stderr: unsigned-integer-overflow
|
||||
# Note: The C++ standard does not officially consider unsigned integer overflows
|
||||
# to be undefined behavior since they are implementation independent.
|
||||
# Flags are alphabetically sorted and are for clang v10.0
|
||||
list(APPEND undefinedSanitizerChecks
|
||||
alignment
|
||||
@ -217,18 +221,12 @@ if (SANITIZE)
|
||||
returns-nonnull-attribute
|
||||
shift
|
||||
signed-integer-overflow
|
||||
unsigned-integer-overflow
|
||||
unreachable
|
||||
vla-bound
|
||||
vptr
|
||||
)
|
||||
list(JOIN undefinedSanitizerChecks "," sanitizerChecks)
|
||||
list(REMOVE_ITEM undefinedSanitizerChecks unsigned-integer-overflow)
|
||||
# The fuzzer excludes reports of unsigned-integer-overflow. Hence, we remove it
|
||||
# from the -fno-sanitize-recover checks. Consider reducing this list if we do not
|
||||
# want to be notified about other failed checks.
|
||||
list(JOIN undefinedSanitizerChecks "," dontRecoverFromChecks)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${sanitizerChecks} -fno-sanitize-recover=${dontRecoverFromChecks}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${sanitizerChecks} -fno-sanitize-recover=${sanitizerChecks}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user