You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Over-allocation in MockRedisAdapter list functions using size_bytes() instead of size() #81
Still present on main, and unchanged through #108/#109/#111 (the mock file is byte-identical). It is worse than described here:
Under the project's C++17, no instantiation of either addSingleList overload compiles. std::vector, std::array and the spanCpp14.hpp span have no size_bytes().
Only a C++20 std::span compiles, and that one allocates sizeof(T) times too much: 48 bytes for 12.
CI never compiles the mock, which is how this went unnoticed; filed as #124.
Validated fix: const size_t count = data.size(); int dataSize = count * sizeof(T); new T[count]. With it, all six vector/array/span × C++17/C++20 combinations compile and run clean under ASan+UBSan, with exactly 12 bytes allocated.
Activity
Fix thread safety, memory bugs, and error handling across redis-adapter
bigsamich commentedon Sep 30, 2026
Still present on
main, and unchanged through #108/#109/#111 (the mock file is byte-identical). It is worse than described here:addSingleListoverload compiles.std::vector,std::arrayand thespanCpp14.hppspan have nosize_bytes().std::spancompiles, and that one allocatessizeof(T)times too much: 48 bytes for 12.CI never compiles the mock, which is how this went unnoticed; filed as #124.
Validated fix:
const size_t count = data.size(); int dataSize = count * sizeof(T); new T[count]. With it, all six vector/array/span × C++17/C++20 combinations compile and run clean under ASan+UBSan, with exactly 12 bytes allocated.