diff options
| author | Kostya Serebryany <kcc@google.com> | 2015-04-10 06:32:29 +0000 |
|---|---|---|
| committer | Kostya Serebryany <kcc@google.com> | 2015-04-10 06:32:29 +0000 |
| commit | cd073d54756560b8aacb420e8872b0e2964a5591 (patch) | |
| tree | 05a09e15417804ba5301865513d4389293f0fc58 | |
| parent | 6bd016be8e301751f5495b1e6755aa8017cb95c0 (diff) | |
| download | bcm5719-llvm-cd073d54756560b8aacb420e8872b0e2964a5591.tar.gz bcm5719-llvm-cd073d54756560b8aacb420e8872b0e2964a5591.zip | |
[lib/Fuzzer] Section: How good is my fuzzer?
llvm-svn: 234571
| -rw-r--r-- | llvm/docs/LibFuzzer.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/docs/LibFuzzer.rst b/llvm/docs/LibFuzzer.rst index 842599cad88..a31f83d3950 100644 --- a/llvm/docs/LibFuzzer.rst +++ b/llvm/docs/LibFuzzer.rst @@ -256,6 +256,21 @@ You can run both fuzzers on the same corpus in parallel:: Periodically restart both fuzzers so that they can use each other's findings. +How good is my fuzzer? +---------------------- + +Once you implement your target function ``TestOneInput`` and fuzz it to death, +you will want to know whether the function or the corpus can be improved further. +One easy to use metric is, of course, code coverage. +You can get the coverage for your corpus like this:: + + ASAN_OPTIONS=coverage_pcs=1 ./fuzzer CORPUS_DIR -runs=0 + +This will run all the tests in the CORPUS_DIR but will not generate any new tests +and dump covered PCs to disk before exiting. +Then you can subtract the set of covered PCs from the set of all instrumented PCs in the binary, +see SanitizerCoverage_ for details. + Fuzzing components of LLVM ========================== |

