code-intelligence.com/cifuzz@v0.40.0/examples/cmake/README.md (about)

     1  # cifuzz CMake example
     2  
     3  This is a simple CMake based project, already configured with
     4  **cifuzz**. It should quickly produce a finding, but slow enough to
     5  see the progress of the fuzzer.
     6  
     7  To start make sure you installed **cifuzz** according to the
     8  main [README](../../README.md).
     9  
    10  You can start the fuzzing with
    11  
    12  ```bash
    13  cifuzz run my_fuzz_test
    14  ```
    15  
    16  ## Create regression test
    17  
    18  After you have discovered a finding, you may want to include this as
    19  part of a regression test. This can be done by building the fuzz test
    20  (my_fuzz_test) as a replayer binary. It is recommended to use the
    21  provided CMake user presets, which can be generated with `cifuzz integrate cmake`.
    22  
    23  ```bash
    24  cmake --preset="cifuzz (Regression Test)"
    25  cmake --build --preset="cifuzz (Regression Test)"
    26  ```
    27  
    28  To execute the replayer binary, run `./.cifuzz-build/replayer/address+undefined/my_fuzz_test`.
    29  When you run the replayer binary, it will use any findings located in
    30  the my_fuzz_test_inputs directory as input.