fix: remove dangling TraceContext pointer storage in SealedIndexTranslator (#48494)#48496
fix: remove dangling TraceContext pointer storage in SealedIndexTranslator (#48494)#48496chyezh wants to merge 1 commit intomilvus-io:2.6from
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chyezh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
[INFO] PR Label Summary by Default
Use /refresh-label to update related check and label manually |
|
[ci-v2-notice] To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.6 #48496 +/- ##
==========================================
+ Coverage 76.99% 77.25% +0.25%
==========================================
Files 1700 1960 +260
Lines 262533 309563 +47030
==========================================
+ Hits 202142 239155 +37013
- Misses 53550 62857 +9307
- Partials 6841 7551 +710
🚀 New features to boost your workflow:
|
…I mismatch milvus-common defines OPENTELEMETRY_STL_VERSION=2017 (PUBLIC), which makes nostd::shared_ptr an alias for std::shared_ptr (16 bytes). However, Milvus core OBJECT libraries (segcore, index, query, etc.) never receive this define because CMake TARGET_OBJECTS does not propagate transitive compile definitions from link targets. Without the define, these translation units use the custom nostd::shared_ptr implementation with a 32-byte PlacementBuffer — a completely different memory layout. This ODR violation causes heap-buffer-overflow detected by ASAN when OTel spans are created/copied across the ABI boundary (e.g. during async cache warmup in SealedIndexTranslator::get_cells). Fix by adding add_compile_definitions(OPENTELEMETRY_STL_VERSION=2017) at the top-level CMakeLists.txt so all translation units use the same layout. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: chyezh <chyezh@outlook.com>
e578e57 to
80845f5
Compare
|
[INFO] PR Label Summary by Default
Use /refresh-label to update related check and label manually |
|
/ci-rerun-gosdk |
SealedIndexTranslator stored a TraceContext member containing raw traceID/spanID pointers originating from Go memory. These pointers dangle when get_cells() is called during async warmup or cache re-population, causing heap-buffer-overflow detected by ASAN.
Remove the TraceContext member and use an empty TraceContext in get_cells() instead, since the original request's trace context is meaningless for deferred index loading.
issue: #48494
pr: #48495