[pgpool-committers: 6781] pgpool: Fix segmentation fault when application name is included in log
Tatsuo Ishii
ishii at sraoss.co.jp
Thu Jun 4 11:33:08 JST 2020
Fix segmentation fault when application name is included in log_line_prefix.
In Pgpool-II 4.1 or before log_line_prefix unconditionally tried to
fetch the application name from backend info (slots array).
Unfortunately in certain corner cases this was not possible. When
connection_cache is off, pgpool resets connection slots
(session->backend->slots[]) at the time when clients sends termination
request to pgpool. If log_min_messages is DEBUG5, pgpool wants to emit
this log message:
DEBUG: RESET ALL CONFIG VARIABLE
which caused a segfault because pgpool tried to refer NULL pointer.
Fix is, if session->backend->slots[] is NULL, do not try to fetch
application name from the variable.
Per bug 615.
Branch
------
V3_7_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=607665b9f907dd0c9a9e4ac3f4c3187d181fb7d8
Modified Files
--------------
src/utils/error/elog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the pgpool-committers
mailing list