pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: jora.gevorgyan@rau.am
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18338: Memory leak in function 'dumpRule'
Date: Mon, 12 Feb 2024 16:09:38 +0200
Message-ID: <ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi> (raw)
In-Reply-To: <18338-ddb9deb8f1646d01@postgresql.org>
References: <18338-ddb9deb8f1646d01@postgresql.org>

On 12/02/2024 15:36, PG Bug reporting form wrote:
> The memory leak is found by a static analyzer developed at [CAST](
> https://www.linkedin.com/company/cast-center/).
> 
> The memory alocated at [in qtabname]() is getting lost when function
> [pg_fatal is
> called](https://github.com/postgres/postgres/blob/09eb633e1baa3b7cd7929f3cc77f9c46f63c20b1/src/bin/pg_dump/p...)

No. pg_fatal() calls exit(1). It's not a leak when you exit the process; 
that will certainly release the memory.

There are hundreds of pg_fatal() calls in pg_dump, so I wonder why the 
tool picked on that one in particular. But it's not a bug.

-- 
Heikki Linnakangas
Neon (https://neon.tech)






view thread (3+ messages)

Message-ID: <ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi>
Permalink:  ../ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi/
Also on:    postgresql.org/message-id/ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, jora.gevorgyan@rau.am
  Subject: Re: BUG #18338: Memory leak in function 'dumpRule'
  In-Reply-To: <ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi>
  References: <18338-ddb9deb8f1646d01@postgresql.org> <ed717500-6975-4e57-84ed-6e1fafa60d6e@iki.fi>

* 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