<div dir="ltr">I just wanted to say thanks for all this great documentation for LibFuzzer!<div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 9, 2015 at 11:32 PM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: kcc<br>
Date: Fri Apr 10 01:32:29 2015<br>
New Revision: 234571<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=234571&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=234571&view=rev</a><br>
Log:<br>
[lib/Fuzzer] Section: How good is my fuzzer?<br>
<br>
Modified:<br>
    llvm/trunk/docs/LibFuzzer.rst<br>
<br>
Modified: llvm/trunk/docs/LibFuzzer.rst<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LibFuzzer.rst?rev=234571&r1=234570&r2=234571&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LibFuzzer.rst?rev=234571&r1=234570&r2=234571&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/docs/LibFuzzer.rst (original)<br>
+++ llvm/trunk/docs/LibFuzzer.rst Fri Apr 10 01:32:29 2015<br>
@@ -256,6 +256,21 @@ You can run both fuzzers on the same cor<br>
<br>
 Periodically restart both fuzzers so that they can use each other's findings.<br>
<br>
+How good is my fuzzer?<br>
+----------------------<br>
+<br>
+Once you implement your target function ``TestOneInput`` and fuzz it to death,<br>
+you will want to know whether the function or the corpus can be improved further.<br>
+One easy to use metric is, of course, code coverage.<br>
+You can get the coverage for your corpus like this::<br>
+<br>
+  ASAN_OPTIONS=coverage_pcs=1 ./fuzzer CORPUS_DIR -runs=0<br>
+<br>
+This will run all the tests in the CORPUS_DIR but will not generate any new tests<br>
+and dump covered PCs to disk before exiting.<br>
+Then you can subtract the set of covered PCs from the set of all instrumented PCs in the binary,<br>
+see SanitizerCoverage_ for details.<br>
+<br>
 Fuzzing components of LLVM<br>
 ==========================<br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>