agora inbox for pgpool-committers@postgresql.org
help / color / mirror / Atom feedpgpool: Fix query cache when pgpool is built without memcached.
6+ messages / 1 participants
[nested] [flat]
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
Branch
------
V4_2_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=27ba379cdc326d1e3040d459fad4e547a5d35...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
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(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
Branch
------
V4_4_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=5a157f772dc645f6c65db384543a63ff3304e...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
Branch
------
V4_5_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=9853e31923bdaac60566f407e7ad7e124710d...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
Branch
------
V4_6_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=441f338ab27aea6ba6145746ecf38ed560237...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgpool: Fix query cache when pgpool is built without memcached.
@ 2025-09-05 09:20 Tatsuo Ishii <ishii@postgresql.org>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2025-09-05 09:20 UTC (permalink / raw)
To: pgpool-committers@lists.postgresql.org
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 <pengbo@sraoss.co.jp>
Backpatch-through: v4.2
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=09ef05a3d9c4d148af214728c632bfa4d9cf7...
Modified Files
--------------
src/query_cache/pool_memqcache.c | 2 ++
1 file changed, 2 insertions(+)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2025-09-05 09:20 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
2025-09-05 09:20 pgpool: Fix query cache when pgpool is built without memcached. Tatsuo Ishii <ishii@postgresql.org>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox