From 79c4a1809b7528f10e136b38abb787f8175bcdf0 Mon Sep 17 00:00:00 2001 From: Shahar Mike Date: Thu, 19 Dec 2024 09:56:33 +0200 Subject: [PATCH] fix: Stack overflow in `DFLYCLUSTER CONFIG` (#4342) fix: Stack overflow in `DFLYCLUSTER CONFIG` It's fine to use the heap in such cases, latency doesn't matter. --- src/server/cluster/cluster_config.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/cluster/cluster_config.cc b/src/server/cluster/cluster_config.cc index c86786c84d2a..05995df56843 100644 --- a/src/server/cluster/cluster_config.cc +++ b/src/server/cluster/cluster_config.cc @@ -40,7 +40,7 @@ bool HasValidNodeIds(const ClusterShardInfos& new_config) { bool IsConfigValid(const ClusterShardInfos& new_config) { // Make sure that all slots are set exactly once. - array slots_found = {}; + vector slots_found(cluster::kMaxSlotNum + 1); if (!HasValidNodeIds(new_config)) { return false;