Commit graph

1 commit

Author SHA1 Message Date
trvon
7e33dd5276
feat(fuzz): S2 — integer boundary-derivative seeds (0/1/-1/MAX/MIN)
For each integer parameter in a PathWitness, derive boundary
perturbations: 0, 1, -1 (signed only), INT_MAX, INT_MIN (signed).
Classical fuzzing literature shows these catch off-by-one and
overflow bugs that random mutation needs many iterations to reach.

Derivatives share the primary witness's finding_id (so Phase 2's
crash-ingest still correlates by id equality) but are NOT added to
findings.predicted.json — adding them would bloat the prediction
map without changing the correlation key. They land in the same
corpus dir alongside the witness-derived and canonical seeds.

Content-hash filenames in corpus_writer naturally collapse
identical perturbations (e.g. when the primary already has flag=0).

* boundary_seeds.{hpp,cpp} — pure function over PathWitness POD
* fuzz_prep_runner.cpp — emit derivatives after each primary seed
* tests/unit/test_boundary_seeds.cpp — 7 cases / 39 assertions
  covering 32-bit signed (5), 32-bit unsigned (3), 8-bit signed,
  pointer skip, 2-param independence, bool (2), partial flag.

Smoke: leaky(int*, int) fixture grows from 4 seeds (1 witness +
3 canonical) to 9 seeds (1 witness + 5 boundaries + 3 canonical).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 16:03:10 -04:00