fix(runtime): append new VamanaIndex virtuals instead of inserting them - #385
Merged
Merged
Conversation
get_memory_usage() and get_memory_breakdown() were added between reconstruct_at() and save() in intel#345, shifting every later vtable slot. VamanaIndex is a pure abstract interface passed across the shared-library boundary, so a consumer compiled against v0.4.0 dispatches save() to get_memory_usage(), leaves the returned Status unconstructed, and frees a garbage pointer in its destructor. Observed as a SIGSEGV inside jemalloc during index serialization in Milvus, whose knowhere is built against a 0.4.0-era runtime-bindings nightly. Nothing catches this at link time: virtual dispatch never resolves by symbol name, so ldd -r and exported-symbol comparison both pass. SOVERSION is PROJECT_VERSION_MAJOR, which stays 0 across 0.4.0 and 0.5.0, so a v0.4.0 consumer resolves SONAME libsvs_runtime.so.0 to a 0.5.0 library and loads it. Moving both declarations after save() restores the v0.4.0 slot indices. No tagged release carries the inserted order -- it has shipped only in nightlies and on rls/v0.5.0 -- so consumers built against those nightlies need a rebuild. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ahuber21
force-pushed
the
fix/vamana-index-vtable-append
branch
from
September 9, 2026 11:16
0dcdfe2 to
08a335c
Compare
|
Tick the box to add this pull request to the merge queue (same as
|
ahuber21
enabled auto-merge (squash)
September 9, 2026 16:34
ethanglaser
approved these changes
Sep 9, 2026
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.
get_memory_usage() and get_memory_breakdown() were added between reconstruct_at() and save() in #345, shifting every later vtable slot. VamanaIndex is a pure abstract interface passed across the shared-library boundary, so a consumer compiled against v0.4.0 dispatches save() to get_memory_usage(), leaves the returned Status unconstructed, and frees a garbage pointer in its destructor. Observed as a SIGSEGV inside jemalloc during index serialization in Milvus, whose knowhere is built against a 0.4.0-era runtime-bindings nightly.
Nothing catches this at link time: virtual dispatch never resolves by symbol name, so ldd -r and exported-symbol comparison both pass. SOVERSION is PROJECT_VERSION_MAJOR, which stays 0 across 0.4.0 and 0.5.0, so a v0.4.0 consumer resolves SONAME libsvs_runtime.so.0 to a 0.5.0 library and loads it.
Moving both declarations after save() restores the v0.4.0 slot indices. No tagged release carries the inserted order -- it has shipped only in nightlies and on rls/v0.5.0 -- so consumers built against those nightlies need a rebuild.