Skip to content

Commit

Permalink
asan already enabled in fuzzing; use PCM_FUZZ
Browse files Browse the repository at this point in the history
Change-Id: I344c0860706e10d404d844da344aac89589850a6
  • Loading branch information
rdementi committed Nov 22, 2024
1 parent a24c637 commit f9d8f38
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022, Intel Corporation
# Copyright (c) 2022-2024, Intel Corporation

cmake_minimum_required(VERSION 3.5)

Expand Down Expand Up @@ -145,6 +145,9 @@ if(PCM_FUZZ)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZER_OPTIONS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZER_OPTIONS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZER_OPTIONS}")
message(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
message(STATUS "CMAKE_EXE_LINKER_FLAGS: ${CMAKE_EXE_LINKER_FLAGS}")
endif(PCM_FUZZ)

#######################
Expand Down
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright (c) 2022, Intel Corporation
# Copyright (c) 2022-2024, Intel Corporation

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/tests)

Expand All @@ -18,7 +18,7 @@ if(UNIX)

endif(UNIX)

if(FUZZ)
if(PCM_FUZZ)
find_package(OpenSSL REQUIRED)
set(SSL_LIBS OpenSSL::SSL OpenSSL::Crypto)
add_executable(urltest-fuzz urltest-fuzz.cpp)
Expand Down
2 changes: 1 addition & 1 deletion tests/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export LSAN_OPTIONS=suppressions="pcm_asan_suppression_file"

echo "Running fuzz tests with running time multiplier $factor"

CC=`which clang` CXX=`which clang++` cmake .. -DCMAKE_BUILD_TYPE=Debug -DFUZZ=1 -DPCM_NO_ASAN=OFF && mkdir -p corpus &&
CC=`which clang` CXX=`which clang++` cmake .. -DCMAKE_BUILD_TYPE=Debug -DPCM_FUZZ=ON && mkdir -p corpus &&
make urltest-fuzz \
pcm-fuzz \
pcm-memory-fuzz \
Expand Down

0 comments on commit f9d8f38

Please sign in to comment.