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")
|
elseif (sanitizer STREQUAL "undefined")
|
||||||
# The following flags not used by fuzzer but used by us may create problems, so consider
|
# The following flags not used by fuzzer but used by us may create problems, so consider
|
||||||
# disabling them: alignment, pointer-overflow.
|
# 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
|
# Flags are alphabetically sorted and are for clang v10.0
|
||||||
list(APPEND undefinedSanitizerChecks
|
list(APPEND undefinedSanitizerChecks
|
||||||
alignment
|
alignment
|
||||||
@ -217,18 +221,12 @@ if (SANITIZE)
|
|||||||
returns-nonnull-attribute
|
returns-nonnull-attribute
|
||||||
shift
|
shift
|
||||||
signed-integer-overflow
|
signed-integer-overflow
|
||||||
unsigned-integer-overflow
|
|
||||||
unreachable
|
unreachable
|
||||||
vla-bound
|
vla-bound
|
||||||
vptr
|
vptr
|
||||||
)
|
)
|
||||||
list(JOIN undefinedSanitizerChecks "," sanitizerChecks)
|
list(JOIN undefinedSanitizerChecks "," sanitizerChecks)
|
||||||
list(REMOVE_ITEM undefinedSanitizerChecks unsigned-integer-overflow)
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${sanitizerChecks} -fno-sanitize-recover=${sanitizerChecks}")
|
||||||
# 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}")
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user