Re: Clang 3.3 Analyzer Results

From: Peter Geoghegan <pg(at)heroku(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: "noloader(at)gmail(dot)com" <noloader(at)gmail(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Clang 3.3 Analyzer Results
Date: 2013-11-11 22:29:52
Message-ID: CAM3SWZRH=-+bjHRQOqdCEqCvU6B5dzXfQZUaDi1nrW0KEgF6Xw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Mon, Nov 11, 2013 at 2:18 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> I'm currently capturing a text version of all the warnings from
> this. Will gzip and post when it finishes. It's generating a lot
> of warnings; I have no idea how many are PostgreSQL problems and
> how many are false positives; will just post the whole set FWIW. I
> am using the 3.4 development nightly snapshot with these commands:

When I tried out scan-build a while ago, the results were kind of
disappointing - there were lots of false positives. Clearly the tool
was inferior to Coverity at that time. I'd be interested to see if
there has been much improvement since.

One thing I noticed at the time was that the tool didn't have any
gumption about elog() and control flow, even though IIRC at that time
we had the abort() trick (see commit
71450d7fd6c7cf7b3e38ac56e363bff6a681973c). I seem to also recall
Coverity correctly handling that, although perhaps I'm unfairly
crediting them with taking advantage of the abort() trick because of
the state of Postgres when I tried each of those two tools - it might
be that scan-build *would* have taken advantage of that at the time,
if only the trick was there.

--
Peter Geoghegan

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeffrey Walton 2013-11-11 22:45:23 Re: Clang 3.3 Analyzer Results
Previous Message David Johnston 2013-11-11 22:28:32 Re: Limiting/disallowing changes of certain columns

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeffrey Walton 2013-11-11 22:45:23 Re: Clang 3.3 Analyzer Results
Previous Message Josh Berkus 2013-11-11 22:20:21 Re: pg_dump and pg_dumpall in real life