contrib: Skip llvm-cov rendering for deterministic fuzz inputs

bitcoin/bitcoin: PR #35608

1 suggestion

Optional improvements

Link

[suggestion] · The fast path also skips llvm-cov compatibility validation

When all profile comparisons match, success no longer establishes that llvm-cov show can render the coverage, although no configuration where merging succeeds but rendering fails was reproduced.

Location: contrib/devtools/deterministic-fuzz-coverage/src/main.rs:257 (head).

Details and suggested fix

Both individual and combined checks return before render_cov when the profile bytes match, and no final render precedes the success banner. Previously, each selected run required llvm-cov show to succeed. The remaining --help probe checks tool availability, not whether the renderer accepts this profile and binary. Thus, if fuzz execution and merging succeed but rendering would fail, this invocation now passes. Equal profiles still support the counter-determinism verdict; the lost diagnostic matters when a later unequal comparison needs a report and encounters the renderer error instead.

Document this tradeoff and qualify the PR's statement that pass/fail results are unchanged. The documented determinism-checking purpose does not establish a separate requirement to validate rendering. If retaining early compatibility diagnostics is desired, render one produced profile per invocation and preserve its error handling while skipping the other deterministic reports. That retains most of the optimization, though it does not restore every input-specific rendering check.


Coverage details

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Documented decisions

The original stated purpose was to detect and debug fuzz determinism and stability issues, using coverage comparison—not to provide a separately described toolchain-compatibility certification.

The introducing PR explicitly describes that purpose, and its README calls this a tool to check for non-determinism in fuzz coverage. The original implementation renders line/region counts, branch counts and expansions before diffing reports. This supports comparison and debugging as the documented reason for rendering, but does not establish that this was its only intended role.

Source 1 · Source 2