Skip to content

Also keep fuzz inputs that increase coverage on older branches#266

Closed
ekzyis wants to merge 1 commit intobitcoin-core:mainfrom
ekzyis:keep-fuzz-inputs-for-older-branches
Closed

Also keep fuzz inputs that increase coverage on older branches#266
ekzyis wants to merge 1 commit intobitcoin-core:mainfrom
ekzyis:keep-fuzz-inputs-for-older-branches

Conversation

@ekzyis
Copy link
Copy Markdown
Contributor

@ekzyis ekzyis commented Mar 22, 2026

closes #265

I think this does what was suggested in #265 (comment).

I haven't run this yet. I only ran the original script once in a ubuntu 24.04 vm.

I'm currently concerned with two things:

  1. Can I continue to set the output dir of the fuzz engines to the real corpus, given hash-based filenames for the fuzz inputs, so overwrites would be idempotent? Before, afl-cmin was only run once per fuzz target. libFuzzer via the test runner was run once per sanitizer.

  2. I'm new to fuzzing. Did I actually understand what I'm doing here?

@ekzyis ekzyis marked this pull request as draft March 22, 2026 14:49
@ekzyis ekzyis force-pushed the keep-fuzz-inputs-for-older-branches branch from 135a441 to 888f0bb Compare March 22, 2026 14:51
(
cd ../qa-assets
git add "${FUZZ_CORPORA_DIR}"
git commit -m "Reduced inputs for ${sanitizer}"
Copy link
Copy Markdown
Contributor Author

@ekzyis ekzyis Mar 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to create a commit per sanitizer and ref. I think it should create one commit per sanitizer for all refs (without wasting time rebuilding the same ref multiple times), or at least mention the ref in the commit message.

git clone --depth=1 https://github.com/bitcoin/bitcoin.git
# TODO: optimize? --no-single-branch increased size from 69M to 170M
# could use ls-remote to list tags and then only fetch tags we need
git clone --depth=1 --no-single-branch https://github.com/bitcoin/bitcoin.git
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure how resource-constrained the vms are on which this will run

Copy link
Copy Markdown
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a stab at this. I’m not that fluent in Shell and also don’t know as much about fuzzing as @maflcko and @dergoegge, but I got a couple comments for you.

@ekzyis ekzyis force-pushed the keep-fuzz-inputs-for-older-branches branch from c79757a to 88faa27 Compare March 25, 2026 17:57
@ekzyis
Copy link
Copy Markdown
Contributor Author

ekzyis commented Mar 26, 2026

The script should be converted to rust first, see #268 (comment).

Glad to close this PR, because this turned out to be conceptually simple, but surprisingly time-consuming due to shell issues

@ekzyis ekzyis closed this Mar 26, 2026
@ekzyis ekzyis deleted the keep-fuzz-inputs-for-older-branches branch March 26, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

delete_nonreduced_fuzz_inputs.sh: Use older branches as well?

2 participants