Updates documentation for a syntax sugar libfuzzer flag,

as implemented in https://reviews.llvm.org/D32193

llvm-svn: 301217
This commit is contained in:
George Karpenkov 2017-04-24 18:39:52 +00:00
parent 38b0d82b2d
commit 0d447d514a
1 changed files with 9 additions and 3 deletions

View File

@ -87,10 +87,16 @@ Some important things to remember about fuzz targets:
* Usually, the narrower the target the better. E.g. if your target can parse several data formats, split it into several targets, one per format. * Usually, the narrower the target the better. E.g. if your target can parse several data formats, split it into several targets, one per format.
Building Fuzzer Usage
-------- ------------
Next, build the libFuzzer library as a static archive, without any sanitizer Very recent versions of Clang (> April 20 2017) include libFuzzer,
and no installation is necessary.
In order to fuzz your binary, use the `-fsanitize=fuzzer` flag during the compilation::
clang -fsanitize=fuzzer,address mytarget.c
Otherwise, build the libFuzzer library as a static archive, without any sanitizer
options. Note that the libFuzzer library contains the ``main()`` function: options. Note that the libFuzzer library contains the ``main()`` function:
.. code-block:: console .. code-block:: console