summaryrefslogtreecommitdiff
path: root/fuzz
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2021-12-21 19:16:47 +0100
committerTim Rühsen <tim.ruehsen@gmx.de>2021-12-21 19:20:52 +0100
commitc81042295e6ef8c6cc82f9a5e590134fc268a8f9 (patch)
tree4b8cc45b4ee9b703c9d59a8d3c90ec594dbfa8de /fuzz
parentf75fcf2985bf7ace36051f5d00a9f7c53e125a2b (diff)
downloadwget-c81042295e6ef8c6cc82f9a5e590134fc268a8f9.tar.gz
Switch fuzzing build from C++ to C
* Makefile.am (oss-fuzz): Build with $CC instead of $CXX. * README.md: Remove CXX and CXXFLAGS exports.
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/Makefile.am2
-rw-r--r--fuzz/README.md4
2 files changed, 2 insertions, 4 deletions
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am
index d2af32c4..0e2b8f39 100644
--- a/fuzz/Makefile.am
+++ b/fuzz/Makefile.am
@@ -96,7 +96,7 @@ oss-fuzz:
XLIBS="-lpsl -lgnutls -lhogweed -lnettle -lidn2 -lunistring"; \
for ccfile in wget*_fuzzer.c; do \
fuzzer=$$(basename $$ccfile .c); \
- $$CXX $$CXXFLAGS -I$(top_srcdir)/src -I$(top_srcdir) -I$(top_srcdir)/lib \
+ $$CC $$CFLAGS -I$(top_srcdir)/src -I$(top_srcdir) -I$(top_srcdir)/lib \
"$${fuzzer}.c" -o "$${fuzzer}" \
../src/libunittest.a ../lib/libgnu.a $${LIB_FUZZING_ENGINE} \
-Wl,-Bstatic $${XLIBS} -Wl,-Bdynamic; \
diff --git a/fuzz/README.md b/fuzz/README.md
index 4519a741..3a88e6a4 100644
--- a/fuzz/README.md
+++ b/fuzz/README.md
@@ -15,14 +15,12 @@ regression testing with top dir 'make check' or 'make check-valgrind'.
Use the following commands on top dir:
```
export CC=clang
-export CXX=clang++
# address sanitizer:
#export CFLAGS="-O1 -g -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined,integer,nullability -fsanitize=address -fsanitize-address-use-after-scope -fsanitize-coverage=trace-pc-guard,trace-cmp"
export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link"
# undefined sanitizer;
export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,vla-bound,vptr -fno-sanitize-recover=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,vla-bound,vptr -fsanitize=fuzzer-no-link"
-export CXXFLAGS="$CFLAGS -stdlib=libc++"
-export LIB_FUZZING_ENGINE="-lFuzzer -lstdc++"
+export LIB_FUZZING_ENGINE="-lFuzzer -lstdc++"
./configure --enable-fuzzing --without-metalink --without-zlib --disable-pcre --without-libuuid --enable-assert
make clean
make -j$(nproc)