mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
The knotd_stdio wrapper is broken and unused. In the context of upcoming AI tools, it's not worth keeping.
1.3 KiB
1.3 KiB
Fuzzing with libFuzzer (requires Clang 6.0+)
- Ensure Clang with
-fsanitize=fuzzersupport (e.g. LLVM) - Configure with
- Compile Knot DNS:
make
- Create and check the fuzzing binaries
cd tests-fuzzmake check
- Download the corpora
git submodule initgit submodule update --recursive --remote
- (Optional) add more test cases
./fuzz_packet -merge=1 fuzz_packet.in <DIR_WITH_NEW_PACKET_TEST_CASES>./fuzz_zscanner -merge=1 fuzz_zscanner.in <DIR_WITH_NEW_ZSCANNER_TEST_CASES>
- Run the fuzzer
- (Set proper symbolizer if necessary
export ASAN_SYMBOLIZER_PATH=$(readlink -f `which llvm-symbolizer-6.0`)for ASAN orexport UBSAN_SYMBOLIZER_PATH=$(readlink -f `which llvm-symbolizer-6.0`)for UBSAN) ./fuzz_packet fuzz_packet.inor./fuzz_zscanner fuzz_zscanner.in- (Add parallel fuzzing
-jobs=<CPUS>
- (Set proper symbolizer if necessary