Repository navigation
Conversation
575371d, which added the DiskANN targets, dropped the line continuation after ivf_rescore in FUZZ_TARGETS and the ivf_rescore rule's recipe, so make stops at the first DiskANN name and builds nothing: $ make -C tests/fuzz all Makefile:158: *** missing separator (did you mean TAB instead of 8 spaces?). Stop. 0de765f then removed numpy.c, which the numpy target still compiles. The list continues past ivf_rescore again, ivf_rescore has its recipe, and the numpy target and its dictionary are gone. make -C tests/fuzz all builds all 36 targets.
575371d replaced rescore's min/max int8 quantizer with a fixed map of [-1, 1] onto [-128, 127], and mode 3 still asserted that a vector of one repeated value quantizes to all zeros, as the replaced quantizer did for a zero range. The current quantizer gives 0 only for values near 0.004, so the target aborts within a few hundred inputs (a vector of NaN gives 127). Mode 3 now asserts that every element gets the same code, which holds for any element-wise quantizer, and the comments on modes 2 and 4 describe the clamps the current quantizer has. Modes 1 and 2 read the fuzz bytes as floats from one byte past the mode byte, a misaligned load UBSan reports in rescore_quantize_float_to_int8(); they copy the bytes to a float array first. The target runs 3.7 million inputs in 60 seconds without a report.
bb3ef78 made the IVF index opt-in behind SQLITE_VEC_EXPERIMENTAL_IVF_ENABLE, off by default, and the fuzz Makefile kept relying on the old default, so its eight IVF targets have built without the index since and fuzz a CREATE that cannot parse `indexed by ivf(...)`. FUZZ_CFLAGS now defines it beside SQLITE_VEC_ENABLE_DISKANN, which gives every target the IVF index the library compiled in before bb3ef78.
This was referenced Oct 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fuzz Makefile builds its eight IVF targets without
SQLITE_VEC_EXPERIMENTAL_IVF_ENABLE, so the library they link has no IVF index: eachcreate virtual table ... indexed by ivf(...)they run fails to parse, and no IVF code runs. bb3ef78 replacedSQLITE_VEC_ENABLE_IVF, which defaulted to 1, withSQLITE_VEC_EXPERIMENTAL_IVF_ENABLE, which defaults to 0, and the fuzz build kept the default.FUZZ_CFLAGSnow defines it besideSQLITE_VEC_ENABLE_DISKANN, so every target builds with the IVF index, as every target did before bb3ef78.This builds on #343, without which no fuzz target builds: its two commits come first here, and the last one is this PR's.
Test. With clang 19 on Linux arm64, from
tests/fuzz,covers 690 functions on #343's branch, none of them IVF's, and 875 here,
vec0_parse_ivf_options()andivf_create_shadow_tables()among them. All eight IVF targets build. With the index compiled in,ivf_cell_overflowfinds an 8-byte input that UBSan reports as a misalignedfloatload:assign-vectorspasses the dimension count whereivf_find_nearest_centroid()takes the size of a vector in bytes, so it reads centroidcfrom bytec * Dinstead of byte4 * c * D, inside the centroids before it. #313 passes the byte size there, and with #313 merged the input runs clean.Origin. The IVF port to photostructure/sqlite-vec, photostructure#12 (65817f4), found that these targets build without the index, and passes the define to the eight IVF targets alone. Here it goes in
FUZZ_CFLAGS, the build every target had before bb3ef78. No open or closed PR or issue here builds the fuzz targets with it; stumpylog's #305 hastests/test-unit.cfollow the same rename. Besides #343, the open PR that touchestests/fuzzis #269, which conflicts with main intests/fuzz/Makefilewith or without this change.