[pgpool-committers: 4506] pgpool: Fix segfault when %a is in log_line_prefix and debug message is

Tatsuo Ishii ishii at postgresql.org
Wed Jan 24 08:32:27 JST 2018


Fix segfault when %a is in log_line_prefix and debug message is on.

log_line_prefix() gets called to create a log line prefix string. If
"%a" is specified in "log_line_prefix" parameter, log_line_prefix()
calls MASTER_CONNECTION macro, which calls
pool_virtual_master_db_node_id(), which calls ereport(), which calls
log_line_prefix() if debug message is on. This leads to an infinite
recursion and a segfault. Fix is, calling MASTER_NODE_ID macro instead
of MASTER_CONNECTION macro.

Per bug 376.

Branch
------
V3_6_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=29bd679632fbc5ecbf58b07ab641f231e37f0e95

Modified Files
--------------
src/utils/error/elog.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)



More information about the pgpool-committers mailing list