Name Date Size #Lines LOC

..--

.gitignoreH A D25-Apr-202554 42

CMakeLists.txtH A D25-Apr-20251.2 KiB3126

README.mdH A D25-Apr-2025789 2622

build.shH A D25-Apr-20252.1 KiB9153

chrono-duration.ccH A D25-Apr-20253.2 KiB137118

chrono-timepoint.ccH A D25-Apr-2025828 3321

float.ccH A D25-Apr-20251.2 KiB4028

fuzzer-common.hH A D25-Apr-20252.4 KiB7842

main.ccH A D25-Apr-2025592 2319

named-arg.ccH A D25-Apr-20252.2 KiB10388

one-arg.ccH A D25-Apr-20252 KiB9381

two-args.ccH A D25-Apr-20252.3 KiB10792

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