mirror of
https://github.com/mirror/wget.git
synced 2025-01-13 13:50:23 +08:00
Switch fuzzing build from C++ to C
* Makefile.am (oss-fuzz): Build with $CC instead of $CXX. * README.md: Remove CXX and CXXFLAGS exports.
This commit is contained in:
parent
f75fcf2985
commit
c81042295e
@ -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; \
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user