doc: add coverage instrumentation hint to libFuzzer quickstart #33536

pull frankomosh wants to merge 1 commits into bitcoin:master from frankomosh:libfuzzer-cov-doc changing 1 files +2 −0
  1. frankomosh commented at 3:57 pm on October 3, 2025: none

    This patch shows how to enable clang source-based coverage instrumentation in the libFuzzer quickstart section. No defaults are changed, and the addition is intended to be optional.

    Fixes silent “no .profraw file” confusion/error when trying to generate coverage data.

  2. DrahtBot added the label Docs on Oct 3, 2025
  3. DrahtBot commented at 3:57 pm on October 3, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33536.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Concept NACK janb84

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. frankomosh marked this as ready for review on Oct 3, 2025
  5. janb84 commented at 9:47 am on October 6, 2025: contributor
    NACK Developer notes already has an extensive section on generating coverage. Maintaining the same documentation in 2 places is not ideal.
  6. in doc/fuzzing.md:27 in 32c0e56c0a
    20@@ -21,6 +21,15 @@ See [further](#run-without-sanitizers-for-increased-throughput) for more informa
    21 There is also a runner script to execute all fuzz targets. Refer to
    22 `./build_fuzz/test/fuzz/test_runner.py --help` for more details.
    23 
    24+If you also want source-based coverage reports, append the instrumentation flags to `cmake --preset=libfuzzer`:
    25+
    26+```sh
    27+$ cmake --preset=libfuzzer \
    


    maflcko commented at 9:54 am on October 6, 2025:
    not sure about recommending libfuzzer here. It has issues properly counting runs, so coverage will be off. See also https://github.com/bitcoin/bitcoin/blob/a33bd767a37dccf39a094d03c2f62ea81633410f/contrib/devtools/deterministic-fuzz-coverage/src/main.rs#L111-L115

    frankomosh commented at 10:33 am on October 6, 2025:

    thanks. wasn’t aware of the run counting issues with LibFuzzer.

    So I guess the best approach is to build without the fuzzer sanitizer ?

  7. frankomosh commented at 10:34 am on October 6, 2025: none

    NACK Developer notes already has an extensive section on generating coverage. Maintaining the same documentation in 2 places is not ideal.

    ok . Would you atleast like to see a reference to the developer notes in this section(assume for someone who lands here first)?

  8. janb84 commented at 12:03 pm on October 6, 2025: contributor

    NACK Developer notes already has an extensive section on generating coverage. Maintaining the same documentation in 2 places is not ideal.

    ok . Would you atleast like to see a reference to the developer notes in this section(assume for someone who lands here first)?

    That would be better, imho (although the correct way would be to first read the contributing guide as a developer), but i can understand that one interested in fuzzing would only read the fuzzing readme before the contributing.md.

  9. frankomosh force-pushed on Oct 8, 2025
  10. doc: mention coverage build in quickstart section
    Points a reader to Developer Notes which explains to compile with llvm source based coverage instrumentation
    df1815e319
  11. frankomosh force-pushed on Oct 8, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-10 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me