File tree Expand file tree Collapse file tree 3 files changed +26
-9
lines changed Expand file tree Collapse file tree 3 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ matrix:
114
114
- env : SCRIPT=arduino VERSION=1.8.2 BOARD=arduino:avr:uno
115
115
- env : SCRIPT=platformio BOARD=uno
116
116
- env : SCRIPT=platformio BOARD=esp01
117
+ - compiler : clang
118
+ addons :
119
+ apt :
120
+ sources : ['ubuntu-toolchain-r-test','llvm-toolchain-trusty-6.0']
121
+ packages : ['clang-6.0','llvm-6.0']
122
+ env : SCRIPT=fuzz CLANG=6.0
117
123
cache :
118
124
directories :
119
125
- " ~/.platformio"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash -eux
2
+
3
+ ROOT_DIR=$( dirname $0 ) /../../
4
+ INCLUDE_DIR=$ROOT_DIR /src/
5
+ FUZZING_DIR=$ROOT_DIR /fuzzing/
6
+ JSON_CORPUS_DIR=$FUZZING_DIR /my_corpus
7
+ JSON_SEED_CORPUS_DIR=$FUZZING_DIR /seed_corpus
8
+
9
+ CXX=" clang++-$CLANG "
10
+ CXXFLAGS=" -g -fprofile-instr-generate -fcoverage-mapping -fsanitize=address,fuzzer"
11
+
12
+ $CXX $CXXFLAGS -o json_fuzzer -I$INCLUDE_DIR $FUZZING_DIR /fuzzer.cpp
13
+
14
+ export ASAN_OPTIONS=" detect_leaks=0"
15
+ export LLVM_PROFILE_FILE=" json_fuzzer.profraw"
16
+ ./json_fuzzer " $JSON_CORPUS_DIR " " $JSON_SEED_CORPUS_DIR " -max_total_time=60
17
+
18
+ llvm-profdata-$CLANG merge -sparse json_fuzzer.profraw -o json_fuzzer.profdata
19
+
20
+ llvm-cov-$CLANG report ./json_fuzzer -instr-profile=json_fuzzer.profdata
You can’t perform that action at this time.
0 commit comments