mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-22 07:22:25 +00:00
fuzz_testing: build with ASAN (assumed to be available)
This commit is contained in:
parent
4cd4a4313d
commit
1a379ef656
2 changed files with 11 additions and 1 deletions
|
@ -238,6 +238,16 @@ if(STATIC)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
|
||||
endif()
|
||||
|
||||
if(SANITIZE)
|
||||
if (MSVC)
|
||||
message(FATAL_ERROR "Cannot sanitize with MSVC")
|
||||
else()
|
||||
message(STATUS "Using ASAN")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Set default blockchain storage location:
|
||||
# memory was the default in Cryptonote before Monero implimented LMDB, it still works but is unneccessary.
|
||||
# set(DATABASE memory)
|
||||
|
|
2
Makefile
2
Makefile
|
@ -114,7 +114,7 @@ release-static-win32:
|
|||
|
||||
fuzz:
|
||||
mkdir -p build/fuzz
|
||||
cd build/fuzz && cmake -D STATIC=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D CMAKE_C_COMPILER=afl-gcc -D CMAKE_CXX_COMPILER=afl-g++ -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=fuzz -D BUILD_TAG="linux-x64" ../.. && $(MAKE)
|
||||
cd build/fuzz && cmake -D STATIC=ON -D SANITIZE=ON -D BUILD_TESTS=ON -D USE_LTO=OFF -D CMAKE_C_COMPILER=afl-gcc -D CMAKE_CXX_COMPILER=afl-g++ -D ARCH="x86-64" -D CMAKE_BUILD_TYPE=fuzz -D BUILD_TAG="linux-x64" ../.. && $(MAKE)
|
||||
|
||||
clean:
|
||||
@echo "WARNING: Back-up your wallet if it exists within ./build!" ; \
|
||||
|
|
Loading…
Reference in a new issue