Fix crash during HSET with search index by disabling SVE2 for RediSearch module build by kairosci · Pull Request #14922 · redis/redis

augmentcode[bot]

augmentcode[bot]

@kairosci kairosci changed the title Fix ZSET keysizes histogram update on partial ZADD failure (#14767) Fix ZSET keysizes histogram update on partial ZADD failure

Mar 24, 2026

@kairosci kairosci marked this pull request as ready for review

March 24, 2026 19:02

augmentcode[bot]

@kairosci kairosci changed the title Fix ZSET keysizes histogram update on partial ZADD failure Fix ZSET keysizes histogram update & RediSearch SVE2 crash

Mar 24, 2026

@kairosci

@kairosci kairosci changed the title Fix ZSET keysizes histogram update & RediSearch SVE2 crash Fix crash during HSET with search index by disabling SVE2 for RediSearch module build

Mar 24, 2026

@kairosci kairosci marked this pull request as ready for review

March 24, 2026 20:56

augmentcode[bot]

cursor[bot]

@kairosci

cursor[bot]

cursor[bot]

cursor[bot]

@kairosci

Introduce cpu_cap.c/h providing a RedisModule_GetCpuCapabilities()-style
API that allows modules to query CPU features (SVE2, SVE, NEON on ARM64;
AVX2, AVX-512, POPCNT on x86) at runtime via server.cpu_caps.

Capabilities are detected once at initServer() startup using getauxval()
on Linux/ARM64 and __builtin_cpu_supports() on x86, and cached in
server.cpu_caps for zero-overhead subsequent queries.

This lays the foundation for modules (e.g. RediSearch/VectorSimilarity)
to perform correct runtime CPU dispatch without resorting to compile-time
architecture flags that may target a newer ISA than the hardware baseline.

Note: the SVE2 march flag fix (armv9-a -> armv8.2-a) in VectorSimilarity
is committed directly in the RediSearch submodule tree, not via an
external patch, keeping the fix where it belongs.