Skip to content

Fuzz: Add curated seed corpus - #2530

Merged
LucaCappelletti94 merged 2 commits into
mainfrom
fuzz-seed-corpus
Sep 22, 2026
Merged

LucaCappelletti94 merged 2 commits into
mainfrom
fuzz-seed-corpus

Conversation

@LucaCappelletti94

@LucaCappelletti94 LucaCappelletti94 commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Step 4 of #2519, stacked on the roundtrip harness branch.

Adds 195 seed inputs in fuzz/fuzz_seeds/, with some from https://github.com/LucaCappelletti94/sql_ast_benchmark and others from the test suite.

build.sh now packages the directory as <target>_seed_corpus.zip next to each binary, which is the OSS-Fuzz and ClusterFuzzLite convention, so code-change and batch runs start from it instead of from random bytes. fuzz/fuzz_seeds/* is added to the RAT exclusions.

With this hot-start, the fuzz_parse_sql and fuzz_parse_roundtrip harnesses reach cov 10938 edges (previously 3238) and 12579 (previously 3360) respectively, in the same 30 seconds window.

The cluster CI job finally starts to actually mine bugs :)

@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

@alamb for instance here in the CI log you can find:

2026-09-19 08:25:42,636 - root - INFO - Could not run previous build of target to determine if this code change (pr/commit) introduced crash. Assuming crash was newly introduced.

It says it cannot build target because we have never yet built the harnesses on main, so it does not have the reference, but it should only go red when it is actually new.

@alamb

alamb commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Can we please make sure this data is not included in the release tarball too?

@LucaCappelletti94
LucaCappelletti94 force-pushed the fuzz-seed-corpus branch 2 times, most recently from 2dfcf1d to bf1d97d Compare September 21, 2026 20:24
@LucaCappelletti94 LucaCappelletti94 added the fuzzer A bug found by the fuzzer label Sep 21, 2026
Base automatically changed from fuzz-roundtrip-harness to main September 22, 2026 09:27
54 hand-written seeds cover the statement grammar, comments, quoting and
dialect-specific syntax. 141 statements are sampled and deduplicated from the
dialect datasets of LucaCappelletti94/sql_ast_benchmark, re-licensed from MIT
to Apache-2.0 by the same sole author.

build.sh packages the seeds as <target>_seed_corpus.zip so ClusterFuzzLite
code-change and batch runs start from them. Every seed parses under at least
one of the 14 fuzzed dialects and round-trips cleanly through Display.
Exclude fuzz/fuzz_seeds from git archive release tarballs via
.gitattributes export-ignore. Add assertions in create-tarball.sh,
verify-release-candidate.sh, and the license CI workflow to verify
the seed corpus is not packaged into source release archives.
@LucaCappelletti94

Copy link
Copy Markdown
Contributor Author

@alamb works as advertised!

2026-09-22 09:52:28,136 - root - INFO - Reproduce command returned: 77. Reproducible on /github/workspace/build-out/fuzz_parse_roundtrip.
2026-09-22 09:52:28,136 - root - INFO - Crash is reproducible.
2026-09-22 09:52:28,140 - root - INFO - Trying to downloading previous build d6afa01.
2026-09-22 09:52:31,093 - root - INFO - Done downloading previous build.
2026-09-22 09:52:31,093 - root - INFO - Trying to reproduce crash using: /tmp/tmpgijikdqb/crash-ed7c22dc7262b04b259945193eee177ad201b92a.
2026-09-22 09:52:31,186 - root - INFO - Reproduce command returned: 77. Reproducible on /github/workspace/cifuzz-prev-build/fuzz_parse_roundtrip.
2026-09-22 09:52:31,186 - root - INFO - The crash is reproducible on previous build. Code change (pr/commit) did not introduce crash.

@LucaCappelletti94
LucaCappelletti94 added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit 4486a79 Sep 22, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzer A bug found by the fuzzer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants