Skip to content

Type Hints, Builds, & Safety#748

Merged
ashvardanian merged 11 commits intomainfrom
main-dev
May 2, 2026
Merged

Type Hints, Builds, & Safety#748
ashvardanian merged 11 commits intomainfrom
main-dev

Conversation

@ashvardanian
Copy link
Copy Markdown
Contributor

No description provided.

ashvardanian and others added 11 commits April 19, 2026 14:51
The amd64 link of libnumkong.so was segfaulting under the experimental
lld 1:18.0-59~exp2 from Noble universe after 91c08cc widened nk_shared
symbol visibility, pushing the LTO unit past what that lld release can
handle.

Switch the JNI Linux job to mold via -fuse-ld=mold for both shared and
module link steps. mold ships in Noble main, supports the LLVM gold
plugin needed for clang LTO, and avoids pinning a separate apt source.
The non-multi branch of `get_typed_vectors_for_keys` pre-allocated a 2D
ndarray of shape (keys_count, dims) and ignored the return value of
`index.get(...)`. Missing keys left rows of uninitialized memory that
were then returned to Python — a bug with security implications, as
heap residue could leak through `Index.get`.

Switch to a single-allocation backing 2D array plus per-key 1D views
into its rows; missing keys yield `py::none()` instead of leaking the
uninitialized row. The data path stays a single allocation regardless
of which keys are present, matching the docstring contract on
`Index.get` (`Returns None, if one key is requested, and its not
present`; `If multiple keys are requested, composes many such responses
into a tuple`).

Pin the contract with a regression test covering single-missing,
single-present, mixed batches, and post-remove lookups for both
multi and non-multi indexes.

Closes #663

Co-Authored-By: Titusz Pan <tp@iscc.io>
Co-Authored-By: Titusz Pan <278556+titusz@users.noreply.github.com>
Previously, the usearch_windows_x86_X.Y.Z.tar package in each release
contained a 64-bit binary library, despite being labeled as 32-bit base x86.

Closes #665
Closes #366

Co-Authored-By: Pesho Ivanov <5638939+pesho-ivanov@users.noreply.github.com>
@ashvardanian ashvardanian merged commit e42b2dc into main May 2, 2026
18 of 19 checks passed
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.

2 participants