pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: hghwng@gmail.com
Subject: BUG #16348: Memory leak when parsing config
Date: Tue, 07 Apr 2020 13:36:20 +0000
Message-ID: <16348-018c10b6fd16ebcc@postgresql.org> (raw)

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.



view thread (4+ messages)  latest in thread

Message-ID: <16348-018c10b6fd16ebcc@postgresql.org>
Permalink:  ../16348-018c10b6fd16ebcc@postgresql.org/
Also on:    postgresql.org/message-id/16348-018c10b6fd16ebcc@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, hghwng@gmail.com
  Subject: Re: BUG #16348: Memory leak when parsing config
  In-Reply-To: <16348-018c10b6fd16ebcc@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox