llvm.org GIT mirror llvm / ea56ec3
[libFuzzer] update docs on -print_coverage/-dump_coverage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302498 91177308-0d34-0410-b5e6-96231b3b80d8 Kostya Serebryany 3 years ago
2 changed file(s) with 19 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
304304 - 1 : close ``stdout``
305305 - 2 : close ``stderr``
306306 - 3 : close both ``stdout`` and ``stderr``.
307 ``-print_coverage``
308 If 1, print coverage information as text at exit.
309 ``-dump_coverage``
310 If 1, dump coverage information as a .sancov file at exit.
307311
308312 For the full list of flags run the fuzzer binary with ``-help=1``.
309313
542546
543547 .. code-block:: console
544548
545 ASAN_OPTIONS=coverage=1 ./fuzzer CORPUS_DIR -runs=0
549 ./fuzzer CORPUS_DIR -runs=0 -print_coverage=1
546550
547551 This will run all tests in the CORPUS_DIR but will not perform any fuzzing.
548 At the end of the process it will dump a single ``.sancov`` file with coverage
549 information. See SanitizerCoverage_ for details on querying the file using the
550 ``sancov`` tool.
552 At the end of the process it will print text describing what code has been covered and what hasn't.
553
554 Alternatively, use
555
556 .. code-block:: console
557
558 ./fuzzer CORPUS_DIR -runs=0 -dump_coverage=1
559
560 which will dump a ``.sancov`` file with coverage information.
561 See SanitizerCoverage_ for details on querying the file using the ``sancov`` tool.
551562
552563 You may also use other ways to visualize coverage,
553564 e.g. using `Clang coverage `_,
9191 FUZZER_FLAG_INT(print_final_stats, 0, "If 1, print statistics at exit.")
9292 FUZZER_FLAG_INT(print_corpus_stats, 0,
9393 "If 1, print statistics on corpus elements at exit.")
94 FUZZER_FLAG_INT(print_coverage, 0, "If 1, print coverage information at exit."
95 " Experimental, only with trace-pc-guard")
96 FUZZER_FLAG_INT(dump_coverage, 0, "If 1, dump coverage information at exit."
97 " Experimental, only with trace-pc-guard")
94 FUZZER_FLAG_INT(print_coverage, 0, "If 1, print coverage information as text"
95 " at exit.")
96 FUZZER_FLAG_INT(dump_coverage, 0, "If 1, dump coverage information as a"
97 " .sancov file at exit.")
9898 FUZZER_FLAG_INT(handle_segv, 1, "If 1, try to intercept SIGSEGV.")
9999 FUZZER_FLAG_INT(handle_bus, 1, "If 1, try to intercept SIGBUS.")
100100 FUZZER_FLAG_INT(handle_abrt, 1, "If 1, try to intercept SIGABRT.")