Re: BUG #6672: Memory leaks in dumputils.c

From: Anna Zaks <zaks(dot)anna(at)gmail(dot)com>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6672: Memory leaks in dumputils.c
Date: 2012-06-01 17:17:48
Message-ID: CA+=xKSXYFkVWc2EPiwMvq7L7rftTny=jdbvLwOss_TtjC3cPhg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter,

Some of the false positives can be suppressed by teaching the analyzer
about the codebase. For example, many of them are due to the custom
assertion/error handlers, where you stop execution on an error path by
calling, for example, 'elog'. You can drastically reduce the number of
false positives by annotating these few functions as 'noreturn'. See
"Custom Assertion Handlers" in
http://clang-analyzer.llvm.org/annotations.html.

If you run into other false positives please feel free to file bugs
against the analyser or ask questions on clang-dev mailing list
(http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev).

Cheers,
Anna.

On Fri, Jun 1, 2012 at 4:02 AM, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
> On 1 June 2012 06:06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> There were no html reports attached, and I'd prefer plain text
>> anyway please ...
>
> I saw a number of false positives when I ran the Clang static analyser
> a few months ago. As I recall, I could see why the tool concluded that
> certain lines of code may have contained errors, even though it was
> evident to me that they actually did not. That said, it probably
> wouldn't hurt to give it another try sometime soon.
>
> --
> Peter Geoghegan       http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Josh Kupershmidt 2012-06-01 18:13:23 Re: BUG #6672: Memory leaks in dumputils.c
Previous Message Bruce Momjian 2012-06-01 15:48:59 Re: BUG #6666: pg_upgrade 9.2beta1 plpython/plpython2