pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #17632: a potential bug of memory leak
2+ messages / 2 participants
[nested] [flat]
* BUG #17632: a potential bug of memory leak
@ 2022-10-11 02:33 PG Bug reporting form <noreply@postgresql.org>
2022-10-11 09:12 ` Re: BUG #17632: a potential bug of memory leak Japin Li <japinli@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2022-10-11 02:33 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: 1157401338@qq.com
The following bug has been logged on the website:
Bug reference: 17632
Logged by: a potential bug of memory leak
Email address: 1157401338@qq.com
PostgreSQL version: 14.5
Operating system: ubuntu20.04
Description:
Hi, I found a potential memory leak bug in the project source
code of postgre, and I have shown the execution sequence of the program
that
may generate the bug on a graph,which can be access by
https://docimg8.docs.qq.com/image/AgAACEPRUipmYhhKHB5OOoBr8hpUfqC5.png?w=2192&h=1336
The red text illustrates the steps that generate the bug,,the file path can
be seen in the blue framed
section.
Although the code shown is for version 12.12 but is still exist in current
version
would you can help to check if this bug is true?thank you for your effort
and patience!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #17632: a potential bug of memory leak
2022-10-11 02:33 BUG #17632: a potential bug of memory leak PG Bug reporting form <noreply@postgresql.org>
@ 2022-10-11 09:12 ` Japin Li <japinli@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Japin Li @ 2022-10-11 09:12 UTC (permalink / raw)
To: 1157401338@qq.com; pgsql-bugs@lists.postgresql.org
On Tue, 11 Oct 2022 at 10:33, PG Bug reporting form <noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 17632
> Logged by: a potential bug of memory leak
> Email address: 1157401338@qq.com
> PostgreSQL version: 14.5
> Operating system: ubuntu20.04
> Description:
>
> Hi, I found a potential memory leak bug in the project source
> code of postgre, and I have shown the execution sequence of the program
> that
> may generate the bug on a graph,which can be access by
> https://docimg8.docs.qq.com/image/AgAACEPRUipmYhhKHB5OOoBr8hpUfqC5.png?w=2192&h=1336
> The red text illustrates the steps that generate the bug,,the file path can
> be seen in the blue framed
> section.
>
>
> Although the code shown is for version 12.12 but is still exist in current
> version
>
>
> would you can help to check if this bug is true?thank you for your effort
> and patience!
The alloc_var() release the memory before allocating memory:
static int
alloc_var(numeric *var, int ndigits)
{
digitbuf_free(var->buf); /* SEE HERE */
var->buf = digitbuf_alloc(ndigits + 1);
if (var->buf == NULL)
return -1;
var->buf[0] = 0;
var->digits = var->buf + 1;
var->ndigits = ndigits;
return 0;
}
So, I don't think it leaks.
--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2022-10-11 09:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-11 02:33 BUG #17632: a potential bug of memory leak PG Bug reporting form <noreply@postgresql.org>
2022-10-11 09:12 ` Japin Li <japinli@hotmail.com>
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