Skip to content

Commit

Permalink
Merge pull request #1823 from silvergasp/fix_cluster_fuzz_flags
Browse files Browse the repository at this point in the history
fix(fuzz): Make sanitizer flags optional
  • Loading branch information
hathach authored Jan 4, 2023
2 parents 549bee9 + 1dcffc6 commit 1804313
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 10 additions & 6 deletions test/fuzz/make.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 --------------


Expand All @@ -42,9 +49,6 @@ INC += $(TOP)/test
# Compiler Flags
CFLAGS += \
-ggdb \
-fsanitize=fuzzer \
-fsanitize=address \
-fsanitize=undefined \
-fdata-sections \
-ffunction-sections \
-fno-strict-aliasing \
Expand Down

0 comments on commit 1804313

Please sign in to comment.