From 2c68a61aa5922cda54fc159c6541c98a9ee8a352 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 31 Jul 2026 09:06:17 -0400 Subject: [PATCH] Fix statuc literals rehashing on resize --- src/static_literals.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/static_literals.c b/src/static_literals.c index 9af1eadf5d..b72764747b 100644 --- a/src/static_literals.c +++ b/src/static_literals.c @@ -191,8 +191,11 @@ pm_node_hash_insert(pm_node_hash_t *hash, const pm_static_literals_metadata_t *m pm_node_t *node = hash->nodes[index]; if (node != NULL) { - uint32_t index = node_hash(metadata, node) & mask; - new_nodes[index] = node; + uint32_t new_index = node_hash(metadata, node) & mask; + while (new_nodes[new_index] != NULL) { + new_index = (new_index + 1) & mask; + } + new_nodes[new_index] = node; } }