|
17 | 17 |
|
18 | 18 | # build project
|
19 | 19 | ./autogen.sh
|
20 |
| -./configure --enable-fuzz-support --enable-never-backslash-C --with-match-limit=1000 --with-match-limit-depth=1000 |
| 20 | +./configure --enable-fuzz-support \ |
| 21 | + --enable-never-backslash-C --with-match-limit=1000 --with-match-limit-depth=1000 \ |
| 22 | + --enable-jit \ |
| 23 | + --enable-pcre2-16 --enable-pcre2-32 |
21 | 24 | make -j$(nproc) clean
|
22 | 25 | make -j$(nproc) all
|
23 | 26 |
|
24 |
| -# build fuzzer |
| 27 | +# build fuzzers |
25 | 28 | $CXX $CXXFLAGS -o $OUT/pcre2_fuzzer \
|
26 | 29 | $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport.a .libs/libpcre2-8.a
|
| 30 | +$CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_16 \ |
| 31 | + $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport-16.a .libs/libpcre2-16.a |
| 32 | +$CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_32 \ |
| 33 | + $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport-32.a .libs/libpcre2-32.a |
| 34 | + |
| 35 | +# test different link sizes |
| 36 | +for i in $(seq 3 4); do |
| 37 | + ./configure --enable-fuzz-support \ |
| 38 | + --enable-never-backslash-C --with-match-limit=1000 --with-match-limit-depth=1000 \ |
| 39 | + --enable-jit \ |
| 40 | + --enable-pcre2-16 --enable-pcre2-32 --with-link-size=${i} |
| 41 | + make -j$(nproc) clean |
| 42 | + make -j$(nproc) all |
| 43 | + |
| 44 | + # build fuzzers |
| 45 | + $CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_${i}l \ |
| 46 | + $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport.a .libs/libpcre2-8.a |
| 47 | + $CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_16_${i}l \ |
| 48 | + $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport-16.a .libs/libpcre2-16.a |
| 49 | + $CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_32_${i}l \ |
| 50 | + $LIB_FUZZING_ENGINE .libs/libpcre2-fuzzsupport-32.a .libs/libpcre2-32.a |
| 51 | +done |
27 | 52 |
|
28 | 53 | # set up dictionary and options to use it
|
29 |
| -cp pcre2_fuzzer.options pcre2_fuzzer.dict $OUT/ |
| 54 | +for bits in "" "_16" "_32"; do |
| 55 | + cp "pcre2_fuzzer${bits}.dict" "${OUT}/pcre2_fuzzer${bits}.dict" |
| 56 | + for linksize in "" "_3l" "_4l"; do |
| 57 | + cp "pcre2_fuzzer${bits}.options" "${OUT}/pcre2_fuzzer${bits}${linksize}.options" |
| 58 | + done |
| 59 | +done |
0 commit comments