Re: Clang Address Sanitizer (Postgres14) Detected Memory Leaks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Clang Address Sanitizer (Postgres14) Detected Memory Leaks
Date
Msg-id 3064258.1598543171@sss.pgh.pa.us
Whole thread Raw
In response to Clang Address Sanitizer (Postgres14) Detected Memory Leaks  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Clang Address Sanitizer (Postgres14) Detected Memory Leaks  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Ranier Vilela <ranier.vf@gmail.com> writes:
> Is this something to worry about, or is it another problem with the
> analysis tool, that nobody cares about?

As far as the first one goes, I'd bet on buggy analysis tool.
The complained-of allocation is evidently for the "extra" state
associated with the timezone GUC variable, and AFAICS guc.c is
quite careful not to leak those.  It is true that the block will
still be allocated at process exit, but that doesn't make it a leak.

I did not trace the second one in any detail, but I don't believe
guc.c leaks sourcefile strings either.  There's only one place
where it overwrites them, and that place frees the old value.

If these allocations do genuinely get leaked in some code path,
this report is of exactly zero help in finding where; and I'm
afraid I'm not very motivated to go looking for a bug that probably
doesn't exist.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Next
From: Robert Haas
Date:
Subject: Re: Should we replace the checks for access method OID with handler OID?