• Home
Name Date Size #Lines LOC

..--

.gitignoreD03-May-202454 42

CMakeLists.txtD03-May-20241.2 KiB3126

README.mdD03-May-2024789 2622

build.shD03-May-20242.1 KiB8952

chrono-duration.ccD03-May-20243.2 KiB136118

float.ccD03-May-2024993 3526

fuzzer-common.hD03-May-20242.3 KiB7640

main.ccD03-May-2024592 2319

named-arg.ccD03-May-20242.2 KiB10187

one-arg.ccD03-May-20242 KiB9281

two-args.ccD03-May-20242.3 KiB10692

README.md

1# Running the fuzzers locally
2
3There is a [helper script](build.sh) to build the fuzzers, which has only been
4tested on Debian and Ubuntu linux so far. There should be no problems fuzzing on
5Windows (using clang>=8) or on Mac, but the script will probably not work out of
6the box.
7
8Something along
9```sh
10mkdir build
11cd build
12export CXX=clang++
13export CXXFLAGS="-fsanitize=fuzzer-no-link -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION= -g"
14cmake .. -DFMT_SAFE_DURATION_CAST=On -DFMT_FUZZ=On -DFMT_FUZZ_LINKMAIN=Off -DFMT_FUZZ_LDFLAGS="-fsanitize=fuzzer"
15cmake --build .
16```
17should work to build the fuzzers for all platforms which clang supports.
18
19Execute a fuzzer with for instance
20```sh
21cd build
22export UBSAN_OPTIONS=halt_on_error=1
23mkdir out_chrono
24bin/fuzzer_chrono_duration out_chrono
25```
26