Skip to content

02354_vector_search_rescoring_distance_in_select_list fails on ARM sanitizer builds since #2341 #2546

Closed

Description

@CarlosFelipeOR

✅ I checked the Altinity Stable Builds lifecycle table, and the Altinity Stable Build version I'm using is still supported.

Type of problem

Bug report - something's broken

Describe the situation

02354_vector_search_rescoring_distance_in_select_list has failed on every run of Stateless tests (arm_asan_ubsan, azure, parallel) since #2341 was merged on 2026-09-10. It fails on antalya-26.6 and antalya-26.8. It passes on every other job, including arm_binary.

The test returns 0.1875 where the reference expects 0.203125:

 Column: Array(Float32)
 -- Search vector: Array(Float64)
 5	0
 6	0.09375
-7	0.203125
+7	0.1875
 8	0.296875

Release builds aren't affected. They still link SimSIMD.

Root cause

#2341 stopped building SimSIMD on ARM sanitizer builds, to work around the SIGILL in #2340. Without SimSIMD, USearch converts float32 to bf16 with its own fallback (f32_to_bf16 in contrib/usearch/include/usearch/index_plugins.hpp). The fallback truncates, while SimSIMD rounds to nearest (conv.i += 0x8000). The vector index stores bf16, and the test disables rescoring, so the distance comes from the index: 2.2 becomes 2.1875 instead of 2.203125.

Possible fixes

  1. Fix the SimSIMD probe and revert Antalya-26.6 - Do not build SimSIMD for ARM sanitizer builds #2341 (preferred). _simsimd_capabilities_arm is compiled under target("arch=armv8.5-a+sve"), only so the assembler accepts mrs ID_AA64ZFR0_EL1. Reading the register by its encoding (S3_0_C0_C4_4) removes the need for the SVE target. This changes the ClickHouse/SimSIMD submodule.
  2. Build SimSIMD without sanitizers on ARM, with -fno-sanitize=... on the _simsimd target, then revert Antalya-26.6 - Do not build SimSIMD for ARM sanitizer builds #2341 for ASan, UBSan and TSan. This stays in our CMake, but it's untested: it assumes the SVE instruction comes from sanitizer codegen. MSan builds would still need SimSIMD disabled. Prove it with Stress test (arm_tsan).
  3. Make the USearch fallback round like SimSIMD. It's a one-line change, but it lives in the ClickHouse/usearch submodule.

Current state

#2520 marks the test as broken on sanitizer builds, and only for this exact diff line. Remove that rule once one of the fixes lands.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    antalyabugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions