mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
This attempts to fix the fuzzers. (#1564)
* This attempts to fix the fuzzers. * Retiring bintray. * Disabling ARM fuzzing.
This commit is contained in:
+4
-4
@@ -1,11 +1,11 @@
|
||||
if(NOT SIMDJSON_LEGACY_VISUAL_STUDIO AND NOT SIMDJSON_WINDOWS_DLL)
|
||||
option(ENABLE_FUZZING "enable building the fuzzers" ON)
|
||||
option(SIMDJSON_ENABLE_FUZZING "enable building the fuzzers" ON)
|
||||
else()
|
||||
option(ENABLE_FUZZING "enable building the fuzzers" OFF)
|
||||
option(SIMDJSON_ENABLE_FUZZING "enable building the fuzzers" OFF)
|
||||
endif()
|
||||
|
||||
|
||||
if(ENABLE_FUZZING)
|
||||
if(SIMDJSON_ENABLE_FUZZING)
|
||||
|
||||
# First attempt at a fuzzer, using libFuzzer.
|
||||
#
|
||||
@@ -17,7 +17,7 @@ if(ENABLE_FUZZING)
|
||||
# export CFLAGS="-fsanitize=fuzzer-no-link,address,undefined"
|
||||
# export CXX=clang++
|
||||
# export CC=clang++
|
||||
# cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_FUZZING=On -DSIMDJSON_FUZZ_LINKMAIN=Off -DSIMDJSON_FUZZ_LDFLAGS=-fsanitize=fuzzer
|
||||
# cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug -DSIMDJSON_ENABLE_FUZZING=On -DSIMDJSON_FUZZ_LINKMAIN=Off -DSIMDJSON_FUZZ_LDFLAGS=-fsanitize=fuzzer
|
||||
# ninja
|
||||
|
||||
# settings this links in a main. useful for reproducing,
|
||||
|
||||
@@ -48,7 +48,7 @@ if [ -e $testfuzzer ] ; then rm $testfuzzer; fi
|
||||
|
||||
# common options
|
||||
CXX_CLAGS_COMMON=-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
COMMON="-GNinja -DCMAKE_CXX_COMPILER=clang++$CLANGSUFFIX -DCMAKE_C_COMPILER=clang$CLANGSUFFIX -DSIMDJSON_BUILD_STATIC=Off -DENABLE_FUZZING=On -DSIMDJSON_COMPETITION=OFF -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DISABLE_DEPRECATED_API=On -DSIMDJSON_FUZZ_LDFLAGS=$SIMDJSON_FUZZ_LDFLAGS"
|
||||
COMMON="-GNinja -DCMAKE_CXX_COMPILER=clang++$CLANGSUFFIX -DCMAKE_C_COMPILER=clang$CLANGSUFFIX -DSIMDJSON_DEVELOPER_MODE=ON -DBUILD_SHARED_LIBS=ON -DSIMDJSON_ENABLE_FUZZING=On -DSIMDJSON_COMPETITION=OFF -DSIMDJSON_GOOGLE_BENCHMARKS=OFF -DSIMDJSON_DISABLE_DEPRECATED_API=On -DSIMDJSON_FUZZ_LDFLAGS=$SIMDJSON_FUZZ_LDFLAGS"
|
||||
|
||||
# A replay build, as plain as it gets. For use with valgrind/gdb.
|
||||
variant=replay
|
||||
|
||||
@@ -23,8 +23,9 @@ if [ ! -d $bdir ] ; then
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DSIMDJSON_BUILD_STATIC=On \
|
||||
-DENABLE_FUZZING=On \
|
||||
-DSIMDJSON_DEVELOPER_MODE=ON \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DSIMDJSON_ENABLE_FUZZING=On \
|
||||
-DSIMDJSON_DISABLE_DEPRECATED_API=On \
|
||||
-DSIMDJSON_FUZZ_LINKMAIN=On
|
||||
ninja all_fuzzers
|
||||
|
||||
+3
-2
@@ -26,8 +26,9 @@ cd build
|
||||
cmake .. \
|
||||
-GNinja \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DSIMDJSON_BUILD_STATIC=On \
|
||||
-DENABLE_FUZZING=On \
|
||||
-DSIMDJSON_DEVELOPER_MODE=ON \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DSIMDJSON_ENABLE_FUZZING=On \
|
||||
-DSIMDJSON_COMPETITION=Off \
|
||||
-DSIMDJSON_FUZZ_LINKMAIN=Off \
|
||||
-DSIMDJSON_GOOGLE_BENCHMARKS=Off \
|
||||
|
||||
Reference in New Issue
Block a user