public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: pgpool: Fix query cache when pgpool is built without memcached.
Date: Fri, 05 Sep 2025 09:20:10 +0000
Message-ID: <[email protected]> (raw)
Fix query cache when pgpool is built without memcached.
When configure is not provided --with-memcached, compiler error
occured.
query_cache/pool_memqcache.c:542:17: èŠć: 'free' called on pointer 'cih' with nonzero offset 24 -Wfree-nonheap-objec
t]
542 | free(ptr);
| ^~~~~~~~~
query_cache/pool_memqcache.c:2843:15: ćè: returned from 'pool_cache_item_header'
2843 | cih = pool_cache_item_header(cacheid);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is caused by the code block:
if (!pool_is_shmem_cache())
{
free(ptr);
}
The compiler thought that "ptr" could be the value returned by
pool_cache_item_header(), because the compiler does not understand
pool_is_shmem_cache() could return false only when memcached is
enabled. To fix this, surround the code block above with #ifdef
USE_MEMCACHED.
Reported-by: Bo Peng <[email protected]>
Backpatch-through: v4.2
Branch
------
V4_3_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=546f228ef7bda6c1e1df56823fbb592d284b2...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgpool: Fix query cache when pgpool is built without memcached.
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox