Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added undefined behavior sanitizer and fuzzers. #1949

Open
wants to merge 7 commits into
base: openssl
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added VERIFY_ALWAYS_SUCCEEDS conflict/safety checking.
  • Loading branch information
chadf committed Aug 16, 2023
commit fc7f7249fad01f2c6dd9c3317dfa08bf19d78663
21 changes: 21 additions & 0 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -249,6 +249,27 @@ if(NOT "${_SANITIZE_FLAGS}" STREQUAL "")
#set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${_X}")
endif()

# Check for incompatible VERIFY_ALWAYS_SUCCEEDS combinations
if(VERIFY_ALWAYS_SUCCEEDS)
if(NOT BUILD_FUZZING)
message(FATAL_ERROR "VERIFY_ALWAYS_SUCCEEDS enabled without BUILD_FUZZING")
endif()

if(BUILD_TESTING)
# Tests may be invalidated
message(FATAL_ERROR "VERIFY_ALWAYS_SUCCEEDS enabled with BUILD_TESTING")
endif()

if(WITH_LIBRARY)
# Such libraries are unsafe, except for fuzzing
message(FATAL_ERROR "VERIFY_ALWAYS_SUCCEEDS enabled with WITH_LIBRARY")
endif()

if(WITH_BINARY)
# Such binaries are unsafe
message(FATAL_ERROR "VERIFY_ALWAYS_SUCCEEDS enabled with WITH_BINARY")
endif()
endif()

# Use std::atomic instead of GCC builtins on macOS PowerPC:
# For more information refer to: https://github.com/PurpleI2P/i2pd/issues/1726#issuecomment-1306335111