Skip to content

tests: Add the cargo-fuzz fuzzing suite#36982

Draft
def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite
Draft

tests: Add the cargo-fuzz fuzzing suite#36982
def- wants to merge 1 commit into
MaterializeInc:mainfrom
def-:fuzz-suite

Conversation

@def-

@def- def- commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Adds the cargo-fuzz suite: fuzz targets, seed corpora, dictionaries, and the runner/CI integration (release-qualification, 24h). Covers the SQL parser/pretty-printer, repr (strconv, jsonb, Row codec/proto, arithmetic oracles), the expr optimizer transforms, the Avro/Protobuf/CSV/pgwire/pgcopy decoders, pgrepr/pgtz, the upsert state machine, persist durable-state decode, and proto round-trips across storage-types/persist/catalog/external table descs.

Also includes the production-side enablement the targets require (the fuzzing/fuzz Cargo features and #[doc(hidden)]/cfg-gated re-exports) and the macOS build fixes those exposures necessitated.

This is the infrastructure PR — mostly mechanical (generated corpora/dicts). The individual bugs it surfaced are split into separate per-subsystem PRs.

Depends on #36983, #36984, #36985, #36986, #36987

🤖 Generated with Claude Code

Squashes every fuzzing-infrastructure change in this branch into one commit,
separate from the individual bug fixes the fuzzing surfaced (one commit each):

* The cargo-fuzz crates under `src/*/fuzz` — targets, seed corpora,
  dictionaries, and `prepare-corpus.sh` scripts — covering the SQL parser /
  pretty-printer, repr (strconv, jsonb, Row codec/proto, arithmetic oracles),
  the expr optimizer transforms, Avro/Protobuf/CSV/pgwire/pgcopy decoders,
  pgrepr/pgtz, the upsert state machine, persist durable-state decode, and the
  proto round-trips across storage-types/persist/catalog/external table descs.
* The harness and runner wiring: `--profile fruitful`, `--jobs auto`,
  per-crate sharding, artifact-based crash detection, `.repro.txt` sidecars,
  and the auto-generated `buf.yaml` fuzz-crate excludes.
* CI: move cargo-fuzz from nightly to release qualification (24h, 48-core).
* The production-side enablement the targets require: the `fuzzing`/`fuzz`
  Cargo features and the `#[doc(hidden)]` / `cfg`-gated re-exports that expose
  upsert, persist-client, and pgwire internals to the fuzz crates.
* The macOS build fixes those exports necessitated: raising and then removing
  the storage `recursion_limit` workaround by switching the affected
  `Stream::inspect` calls to `InspectCore::inspect_container`, which avoids the
  objc2-driven trait-solver overflow.
* The sqllogictest/testdrive golden updates for the identifier-quoting changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant