From fbe9b131a10c0f34ff3d923b9bddc4c7d4e91884 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 5 Dec 2025 15:17:09 -0500 Subject: [PATCH] Correct constant pool bucket type logic When replacing an owned constant by a different type (constant or shared) replace with the correct type instead of defaulting to shared. --- src/util/pm_constant_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/pm_constant_pool.c b/src/util/pm_constant_pool.c index 38ea01a228..922ce6a18c 100644 --- a/src/util/pm_constant_pool.c +++ b/src/util/pm_constant_pool.c @@ -264,7 +264,7 @@ pm_constant_pool_insert(pm_constant_pool_t *pool, const uint8_t *start, size_t l // constant and replace it with the shared constant. xfree((void *) constant->start); constant->start = start; - bucket->type = (unsigned int) (PM_CONSTANT_POOL_BUCKET_DEFAULT & 0x3); + bucket->type = (unsigned int) (type & 0x3); } return bucket->id;