[pgpool-committers: 1095] pgpool: Fix memqcache segfaults reported in bug#63.

Tatsuo Ishii ishii at postgresql.org
Sun Jun 30 17:15:37 JST 2013


Fix memqcache segfaults reported in bug#63.

When a query executes and the query result is too large,
query_context->temp_cache is discarded the query result is not
committed to cache storage when the query completed. In extended query
mode, it is possible that the same query context is used for
subsequent bind/execute cycle through reusing the portal. Problem is,
query_context->temp_cache is already gone and a segfault is caused by
accessing the pointer. To fix this, when query_context->temp_cache is
discarded, set the pointer to NULL and whenever access
query_context->temp_cache, check it is NULL or not.

Branch
------
master

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

Modified Files
--------------
pool_memqcache.c     |   11 ++++++++++-
pool_proto_modules.c |   21 +++++++++++++++------
pool_query_context.c |    8 +++++---
3 files changed, 30 insertions(+), 10 deletions(-)



More information about the pgpool-committers mailing list