mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Add infrastructure for building fuzz testing targets with libFuzzer or other fuzzing engines (e.g., OSS-Fuzz's LIB_FUZZING_ENGINE). Features: - CMake_BUILD_FUZZING option in root CMakeLists.txt - Fuzzing/CMakeLists.txt with add_fuzzer() macro - Support for libFuzzer and external fuzzing engines - Documentation in Tests/Fuzzing/README.rst The infrastructure is opt-in and requires a compatible fuzzing engine. If CMake_BUILD_FUZZING is enabled but no engine is found, configuration fails with a clear error message. See Tests/Fuzzing/README.rst for build instructions.
27 lines
719 B
ReStructuredText
27 lines
719 B
ReStructuredText
Fuzzing Seed Corpora
|
|
====================
|
|
|
|
This directory contains seed corpus files for the CMake fuzz targets.
|
|
Each subdirectory corresponds to a specific fuzzer.
|
|
|
|
Regenerating Binary Corpus Files
|
|
--------------------------------
|
|
|
|
Some corpus files are binary and include generation scripts for reproducibility:
|
|
|
|
- ``elf/generate.py`` - Generates minimal ELF headers for cmELFFuzzer
|
|
|
|
To regenerate::
|
|
|
|
cd elf && python3 generate.py
|
|
|
|
Adding New Corpus Files
|
|
-----------------------
|
|
|
|
When adding new corpus files:
|
|
|
|
1. Keep files minimal - smaller seeds lead to faster fuzzing
|
|
2. For binary formats, include a generation script
|
|
3. Cover different code paths and edge cases
|
|
4. Avoid duplicating coverage between files
|