| 1 |
### Export Flags |
| 2 |
|
| 3 |
``` |
| 4 |
export CC=clang |
| 5 |
export CXX=clang++ |
| 6 |
export LIB_FUZZING_ENGINE=-fsanitize=fuzzer |
| 7 |
export CFLAGS="-O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link" |
| 8 |
export CXXFLAGS="$CFLAGS" |
| 9 |
export LDFLAGS="$CFLAGS" |
| 10 |
``` |
| 11 |
|
| 12 |
### Compile Guide |
| 13 |
|
| 14 |
Note: While compiling fuzzing suite, Don't use bloat libraries. |
| 15 |
|
| 16 |
``` |
| 17 |
./configure --disable-ffmpeg --disable-ssl --disable-speex-aec --disable-speex-codec --disable-g7221-codec --disable-gsm-codec --disable-ilbc-codec --disable-resample --disable-libsrtp --disable-libwebrtc --disable-libyuv |
| 18 |
|
| 19 |
make dep |
| 20 |
make -j$(nproc) |
| 21 |
make fuzz |
| 22 |
``` |
| 23 |
|
| 24 |
|
| 25 |
### Run |
| 26 |
|
| 27 |
``` |
| 28 |
cd tests/fuzz |
| 29 |
mkdir cov-json |
| 30 |
unzip seed/fuzz-json_seed_corpus.zip |
| 31 |
./fuzz-json cov-json/ fuzz-json_seed_corpus/ |
| 32 |
``` |
| 33 |
|