Re: Clang 3.3 Analyzer Results - Mailing list pgsql-hackers

From Jeffrey Walton
Subject Re: Clang 3.3 Analyzer Results
Date
Msg-id CAH8yC8md4bSpsJ93ULFDp9uZuimN_NnoV8FSLF9w48gNLMBOWA@mail.gmail.com
Whole thread Raw
In response to Re: Clang 3.3 Analyzer Results  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: Clang 3.3 Analyzer Results  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Nov 12, 2013 at 6:04 PM, Kevin Grittner <kgrittn@ymail.com> wrote:
> Peter Eisentraut <peter_e@gmx.net> wrote:
>
>> I have tracked scan-build for some time, and I'm sure that almost
>> all of these bugs are false positives at this point.
>
> From poking around, I agree.  One particular error I noticed that
> it makes a lot is that in a loop it says that an assigned value is
> not referenced if the reference will not be hit until the next
> iteration of the loop.
>
>> Btw., you can also keep score here:
>> http://pgci.eisentraut.org/jenkins/view/PostgreSQL/job/postgresql_master_scan-build/
>
> Cool.  I wasn't aware that anyone was already looking at this.
>
>> It's worth keeping an eye on this, but it's not worth losing
>> sleep over.
>
> Agreed in general; however, with this 3.4 development build the
> "Memory Error" section only showed two problems, and those were the
> only two problems I found that were real.  It might be worth
> monitoring that one section.
>
> If nobody objects, I'll fix that small memory leak in the
> regression test driver.  Hopefully someone more familiar with
> pg_basebackup will fix the double-free (and related problems
> mentioned by Tom) in streamutil.c.
Well, how about the use of the unintialized values?

I did not check any with the long path lengths, but the
`pqsecure_write` in fe-secure.c looks valid to me. `spinfo` is
declared, Clang builds/finds the path, then the unitializaed `spinfo`
is used in `RESTORE_SIGPIPE(conn, spinfo);`.

Anyway, I don't mean to sound argumentative.

Jeff



pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Clang 3.3 Analyzer Results
Next
From: Tomas Vondra
Date:
Subject: Re: FDW: possible resjunk columns in AddForeignUpdateTargets