sqlite-vec/tests
Alex Garcia 0dd0765cc6 Add vec-mismatch fuzz target that catches aCleanup(a) bug in ensure_vector_match
Targeted fuzzer for two-argument vector functions (vec_distance_*,
vec_add, vec_sub) that binds a valid JSON vector as arg1 and fuzz
data as arg2. This exercises the error path in ensure_vector_match()
where the first vector parses successfully (with sqlite3_free cleanup)
but the second fails, triggering the buggy aCleanup(a) call on line
1031 of sqlite-vec.c (should be aCleanup(*a)).

The fuzzer catches this immediately — ASAN reports "bad-free" when
sqlite3_free is called on a stack address.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:45:50 -08:00
..
__snapshots__ Add Python regression tests for existing insert/delete paths 2026-03-02 18:12:01 -08:00
afbd Metadata filtering (#124) 2024-11-20 00:59:34 -08:00
correctness knn cleanups and tests 2024-07-05 12:07:45 -07:00
fuzz Add vec-mismatch fuzz target that catches aCleanup(a) bug in ensure_vector_match 2026-03-02 20:45:50 -08:00
leak-fixtures fuzz work 2024-07-25 11:16:06 -07:00
minimum properly check SQLITE_THREADSAFE for static compilation 2024-08-09 13:23:18 -07:00
.gitignore Initial commit 2024-04-20 13:38:58 -07:00
.python-version PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
build.rs Update test-unit.c and unittest.rs functions to enforce pre-existing behavior 2026-03-02 17:46:11 -08:00
Cargo.lock Initial commit 2024-04-20 13:38:58 -07:00
Cargo.toml Initial commit 2024-04-20 13:38:58 -07:00
conftest.py PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
fuzz.py docs and fuzz 2024-07-16 22:28:15 -07:00
helpers.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
pyproject.toml PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
skip.test-correctness.py PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00
sqlite-vec-internal.h Add LPAREN, RPAREN, COMMA token types to the scanner 2026-03-02 18:07:57 -08:00
test-auxiliary.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-general.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-insert-delete.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-knn-distance-constraints.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-loadable.py --managed-python, fix flakey tests 2026-02-13 07:08:48 -08:00
test-metadata.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-partition-keys.py Extract shared Python test utilities into tests/helpers.py 2026-03-02 20:05:21 -08:00
test-unit.c Add LPAREN, RPAREN, COMMA token types to the scanner 2026-03-02 18:07:57 -08:00
test-wasm.mjs fmt 2024-07-31 12:55:46 -07:00
unittest.rs Update test-unit.c and unittest.rs functions to enforce pre-existing behavior 2026-03-02 17:46:11 -08:00
utils.py Initial commit 2024-04-20 13:38:58 -07:00
uv.lock PARTITION KEY support (#122) 2024-11-20 00:02:04 -08:00