Szymon Malewski
d817e56e87
vector_similarity_fcts.cc: fix strict aliasing violation in extract_float_vector
...
Previous code performed endian conversion by bulk-copying raw bytes
into a std::vector<float> and then iterating over it via a
reinterpret_cast<uint32_t*> pointer. Accessing float storage through a
uint32_t* violates C++ strict aliasing rules, giving the compiler
freedom to reorder or elide the stores, causing undefined behavior.
Replace the two-pass approach with a single-pass loop using
seastar::consume_be<uint32_t>() and std::bit_cast<float>(), which is
both well-defined and auto-vectorizable.
Follow-up #28754
Closes scylladb/scylladb#28912
2026-03-06 09:15:45 +01:00
..
2026-02-26 14:46:53 +02:00
2026-03-06 09:15:45 +01:00
2025-12-15 09:45:56 +02:00
2026-03-05 19:22:34 +02:00
2026-03-05 19:22:34 +02:00
2026-02-26 14:46:53 +02:00
2025-11-21 12:32:52 +01:00
2025-11-21 12:32:52 +01:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2026-01-21 14:56:01 +01:00
2024-12-18 17:45:13 +02:00
2025-04-03 13:51:42 +03:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2026-02-26 14:46:53 +02:00
2026-02-26 14:46:53 +02:00
2024-12-18 17:45:13 +02:00
2025-01-15 11:10:35 +01:00
2026-02-26 15:29:12 +01:00
2025-07-01 12:58:11 +02:00
2025-07-01 12:58:11 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2025-02-25 10:32:32 +03:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2025-08-28 23:33:15 +02:00
2025-09-24 13:23:38 +03:00
2026-03-03 21:18:11 +01:00
2026-03-04 07:26:00 +01:00
2026-02-20 07:03:46 +02:00
2025-02-28 13:57:13 +03:00
2026-02-20 07:03:46 +02:00
2026-01-22 15:38:40 +01:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-10-30 14:07:58 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2026-03-03 21:18:11 +01:00
2024-12-18 17:45:13 +02:00
2025-09-16 23:40:47 +03:00
2025-09-16 23:40:47 +03:00
2025-09-24 13:23:38 +03:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00
2025-08-27 13:47:04 +03:00
2025-08-05 12:34:48 +02:00
2024-12-18 17:45:13 +02:00
2024-12-18 17:45:13 +02:00