Merge pull request #1823 from silvergasp/fix_cluster_fuzz_flags

fix(fuzz): Make sanitizer flags optional
This commit is contained in:
Ha Thach 2023-01-04 13:44:33 +07:00 committed by GitHub
commit 18043131d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 6 deletions

View File

@ -38,6 +38,8 @@ jobs:
- name: Build Fuzzer
run: |
export CC=clang
export CXX=clang++
fuzz_harness=$(ls -d test/fuzz/device/*/)
for h in $fuzz_harness
do

View File

@ -16,9 +16,9 @@ __check_defined = \
#-------------- Fuzz harness compiler ------------
CC = clang
CXX = clang++
GDB = gdb
CC ?= clang
CXX ?= clang++
GDB ?= gdb
OBJCOPY = objcopy
SIZE = size
MKDIR = mkdir
@ -34,6 +34,13 @@ else
PYTHON = python3
endif
#-------------- Fuzz harness flags ------------
COVERAGE_FLAGS ?= -fsanitize-coverage=trace-pc-guard
SANITIZER_FLAGS ?= -fsanitize=fuzzer \
-fsanitize=address
CFLAGS += $(COVERAGE_FLAGS) $(SANITIZER_FLAGS)
#-------------- Source files and compiler flags --------------
@ -42,9 +49,6 @@ INC += $(TOP)/test
# Compiler Flags
CFLAGS += \
-ggdb \
-fsanitize=fuzzer \
-fsanitize=address \
-fsanitize=undefined \
-fdata-sections \
-ffunction-sections \
-fno-strict-aliasing \