sqlite-vec/tests/fuzz
Alex Garcia a61d45183b Add comprehensive fuzz testing infrastructure with 6 new targets
- Fix numpy.c: tautology bug (|| → &&), infinite loop, and missing
  sqlite3_vec_numpy_init call
- Replace tests/fuzz/Makefile: auto-detect clang, add UBSAN, macOS
  ld_classic workaround, generic build rules for all 10 targets
- Add 6 new fuzz targets: shadow-corrupt (corrupted shadow tables),
  vec0-operations (INSERT/DELETE/query sequences), scalar-functions
  (all 18 SQL scalar functions), vec0-create-full (CREATE + lifecycle),
  metadata-columns (metadata/auxiliary columns), vec-each (vec_each TVF)
- Add seed corpora for shadow-corrupt, vec0-operations, exec, and json
- Add fuzz-build/fuzz-quick/fuzz-long targets to root Makefile

All 10 targets verified building and running on macOS ARM (Apple Silicon).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:33:05 -08:00
..
corpus Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
targets Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
.gitignore fuzz work 2024-07-25 11:16:06 -07:00
exec.c fuzz work 2024-07-25 11:16:06 -07:00
exec.dict fuzz work 2024-07-25 11:16:06 -07:00
json.c fuzz work 2024-07-25 11:16:06 -07:00
Makefile Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
metadata-columns.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
numpy.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
numpy.dict fuzz work 2024-07-25 11:16:06 -07:00
README.md fmt 2024-07-31 12:55:46 -07:00
scalar-functions.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
scalar-functions.dict Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
shadow-corrupt.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
vec-each.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
vec0-create-full.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00
vec0-create.c fuzz work 2024-07-25 11:16:06 -07:00
vec0-create.dict fuzz work 2024-07-25 11:16:06 -07:00
vec0-operations.c Add comprehensive fuzz testing infrastructure with 6 new targets 2026-03-02 20:33:05 -08:00

ASAN_OPTIONS=detect_leaks=1 ./targets/vec0_create \
  -dict=./vec0-create.dict -max_total_time=5 \
  ./corpus/vec0-create
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"


LDFLAGS="-L/opt/homebrew/opt/llvm/lib/c++ -Wl,-rpath,/opt/homebrew/opt/llvm/lib/c++"