[pgpool-committers: 839] pgpool: Fix long standing bug with timestamp rewriting code for process

Tatsuo Ishii ishii at postgresql.org
Mon Mar 18 16:14:39 JST 2013


Fix long standing bug with timestamp rewriting code for processing
extended protocol.

Parse() allocate memory using palloc() while rewriting the parse
message.  Problem is, the rewritten message was kept in the data which
is managed by pool_create_sent_message() etc. The function assumes
that all the data is in session context memory. However, palloc()
allocates memory in query context of course, and gets freeed later on
when the query context disappears. And the function tries to free the
memory as well, which causes various problems, including segfault and
double free. To fix this, memory to store rewritten message is
allocated using session context. The bug was there since pgpool-II 3.0
was born.

Problem analysis and patch contributed by Naoya Anzai.

Branch
------
V3_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=c45243072a27a8a605fef1e00e4dc3be51c1e194

Modified Files
--------------
pool_proto_modules.c |    3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)



More information about the pgpool-committers mailing list