Re: clang's static checker report. - Mailing list pgsql-hackers

From Greg Stark
Subject Re: clang's static checker report.
Date
Msg-id 407d949e0908301007h1f5d017h96fadcb46ba0cdbb@mail.gmail.com
Whole thread Raw
In response to Re: clang's static checker report.  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Responses Re: clang's static checker report.  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
List pgsql-hackers
On Sun, Aug 30, 2009 at 5:58 PM, Grzegorz Jaskiewicz<gj@pointblue.com.pl> wrote:
> with Greg's suggested palloc and friends patch:
> http://zlew.org/postgresql_static_check/scan-build-2009-08-30-3

Argh. That didn't help at all. hm, I suppose instead of (exit(1),NULL)
we could just put ((void*)1) there?

But I think Tom's right. Worse, I think until it can do
inter-procedural analysis these messages will always be nearly all
false positives. Many if not most of our functions take pointers or
data structures which contain pointers as arguments or return values.
Most of the time those arguments and return values cannot contain NULL
pointers and the code doesn't bother to check that every single time.

-- 
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Grzegorz Jaskiewicz
Date:
Subject: Re: clang's static checker report.
Next
From: Jeff Janes
Date:
Subject: Re: [pgsql-hackers] Daily digest v1.9430 (16 messages)