fuzz: Extend scriptpubkeyman coverage #34170

pull Chand-ra wants to merge 1 commits into bitcoin:master from Chand-ra:scriptpubkeyman changing 1 files +98 −1
  1. Chand-ra commented at 12:04 pm on December 29, 2025: none
    Add fuzzing coverage for several missing DescriptorScriptPubKeyMan methods.
  2. DrahtBot added the label Fuzzing on Dec 29, 2025
  3. DrahtBot commented at 12:04 pm on December 29, 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/34170.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32876 (refactor: use options struct for signing and PSBT operations by Sjors)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • setup -> set up [“setup” is a noun; the verb phrase here should be “set up”]

    2025-12-30

  4. DrahtBot added the label CI failed on Dec 29, 2025
  5. DrahtBot commented at 1:20 pm on December 29, 2025: contributor

    🚧 At least one of the CI tasks failed. Task macOS native, fuzz: https://github.com/bitcoin/bitcoin/actions/runs/20572426083/job/59082228214 LLM reason (✨ experimental): Uncaught std::runtime_error “Unable to expand descriptor” in fuzz target scriptpubkeyman caused the CI failure.

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  6. fuzz: extend scriptpubkeyman coverage
    Add fuzzing coverage for several missing `DescriptorScriptPubKeyMan`
    methods.
    09f0cf628d
  7. in src/wallet/test/fuzz/scriptpubkeyman.cpp:202 in a9af94b211
    193@@ -194,6 +194,76 @@ FUZZ_TARGET(scriptpubkeyman, .init = initialize_spkm)
    194                 auto bip32derivs = fuzzed_data_provider.ConsumeBool();
    195                 auto finalize = fuzzed_data_provider.ConsumeBool();
    196                 (void)spk_manager->FillPSBT(psbt, txdata, sighash_type, sign, bip32derivs, nullptr, finalize);
    197+            },
    198+            [&] {
    199+                std::vector<unsigned char> key_bytes = ConsumeFixedLengthByteVector(fuzzed_data_provider, 32);
    200+                CKeyingMaterial master_key(key_bytes.begin(), key_bytes.end());
    201+                WalletBatch batch{wallet.GetDatabase()};
    202+                (void)spk_manager->Encrypt(master_key, &batch);
    


    brunoerg commented at 1:43 pm on December 29, 2025:
    As far as I remember, we were avoiding to cover any function related to encryption/decryption because it makes the target even slower.
  8. Chand-ra force-pushed on Dec 30, 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-12-31 06:13 UTC

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