BUG #16348: Memory leak when parsing config - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #16348: Memory leak when parsing config
Date
Msg-id 16348-018c10b6fd16ebcc@postgresql.org
Whole thread Raw
Responses Re: BUG #16348: Memory leak when parsing config
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      16348
Logged by:          Hugh Wang
Email address:      hghwng@gmail.com
PostgreSQL version: 12.2
Operating system:   Arch Linux
Description:

SUMMARY:
Memory leaked by gui-file.l:ProcessConfig accumulates across repeated SIGHUP
cycles.

ANALYSIS:
When parsing config file, gui-file.l:ProcessConfig sets up memory context.
It invokes guc-file.l:ProcessConfigFileInternal, which is expected to leak
memory. It's okay because the leaked memory will be freed when cleaning up
the context. Next, guc-file.l:ProcessConfigFileInternal associates each
config item with filename by calling guc.c:set_config_option, which calls
guc.c:guc_strdup. However, guc.c:guc_strdup is not aware of the memory
context, and invokes  libc.so:strdup directly.


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #16347: pgbadger is missing in the repo
Next
From: Masahiko Sawada
Date:
Subject: Re: [bug] Wrong bool value parameter