pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18338: Memory leak in function 'dumpRule'
3+ messages / 3 participants
[nested] [flat]
* BUG #18338: Memory leak in function 'dumpRule'
@ 2024-02-12 13:36 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 2 replies; 3+ messages in thread
From: PG Bug reporting form @ 2024-02-12 13:36 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: jora.gevorgyan@rau.am
The following bug has been logged on the website:
Bug reference: 18338
Logged by: Jora
Email address: jora.gevorgyan@rau.am
PostgreSQL version: 16.2
Operating system: Ubuntu 20.04
Description:
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...)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18338: Memory leak in function 'dumpRule'
@ 2024-02-12 14:04 Daniel Gustafsson <daniel@yesql.se>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Gustafsson @ 2024-02-12 14:04 UTC (permalink / raw)
To: jora.gevorgyan@rau.am; pgsql-bugs@lists.postgresql.org
> On 12 Feb 2024, at 14:36, PG Bug reporting form <noreply@postgresql.org> wrote:
> The memory leak is found by a static analyzer developed at [CAST](
> https://www.linkedin.com/company/cast-center/).
Seems like they have some more work to do on their product.
> 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...)
See src/include/common/logging.h: pg_fatal() calls exit(1), so there is no leak
here.
--
Daniel Gustafsson
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #18338: Memory leak in function 'dumpRule'
@ 2024-02-12 14:09 Heikki Linnakangas <hlinnaka@iki.fi>
parent: PG Bug reporting form <noreply@postgresql.org>
1 sibling, 0 replies; 3+ messages in thread
From: Heikki Linnakangas @ 2024-02-12 14:09 UTC (permalink / raw)
To: jora.gevorgyan@rau.am; pgsql-bugs@lists.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)
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-02-12 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-12 13:36 BUG #18338: Memory leak in function 'dumpRule' PG Bug reporting form <noreply@postgresql.org>
2024-02-12 14:04 ` Daniel Gustafsson <daniel@yesql.se>
2024-02-12 14:09 ` Heikki Linnakangas <hlinnaka@iki.fi>
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