From ee8a8896859f3380191cfa3a9482b08203284b1d Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 3 Jul 2026 12:55:30 +0000 Subject: [PATCH 1/2] fix: size redis command round counters by enum range redis_cmd_current_rounds_ was sized by the number of registered commands but indexed by the RedisCommandType enum value. Optional commands are pinned with gaps at 176-186 (COMPACT/FAULT_INJECT/ELOQVEC_*/KEYSPACE), so their enum values exceed the registered-command count and indexing them read/wrote past the buffer (caught by ASan when running fault_inject). Size the per-core vector by the enum value range instead. --- src/redis_service.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/redis_service.cpp b/src/redis_service.cpp index 5bda56f7..f109f90c 100644 --- a/src/redis_service.cpp +++ b/src/redis_service.cpp @@ -743,7 +743,10 @@ bool RedisServiceImpl::Start(brpc::Server &brpc_server) redis_cmd_current_rounds_.resize(core_num_); for (auto &vec : redis_cmd_current_rounds_) { - vec.resize(command_types.size() + 10, 1); + // Indexed by RedisCommandType, whose values are pinned with gaps + // (optional commands occupy 176-186), so size by the enum range + // rather than the number of registered commands. + vec.resize(256, 1); } // The metrics registry and redis_meter are already created by From 4be082011a1edf37ce7410c398db7299feca2025 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 3 Jul 2026 13:47:39 +0000 Subject: [PATCH 2/2] update subm --- data_substrate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data_substrate b/data_substrate index 83d4162f..2e894d9b 160000 --- a/data_substrate +++ b/data_substrate @@ -1 +1 @@ -Subproject commit 83d4162f7ce3164f8e26eb5e010712a2c7fa42fd +Subproject commit 2e894d9b95ab1e6d8f10b88e3fa84d5a14f6ab7a