From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>, Alex Hunsaker <badalex(at)gmail(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: clang's static checker report. |
Date: | 2009-08-30 16:29:16 |
Message-ID: | 13898.1251649756@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> I think most of the remaining false positives are cases where palloc,
> palloc0, repalloc, MemoryContextAlloc, or MemoryContextAllocZero
> return values are deferenced. Clang doesn't know that these functions
> never return NULL so it's marking every case as a possible NULL
> dereference.
If clang assumes that every function that returns a pointer could return
NULL, then we are going to have many many many many false positives
at levels far removed from palloc. I'd almost suggest that we look for
a way to reverse its default assumption about that. Failing that,
I fear we shall simply have to ignore that particular message as
uselessly noisy.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-30 16:54:19 | Re: clang's static checker report. |
Previous Message | Tom Lane | 2009-08-30 16:24:15 | Re: drop tablespace error: invalid argument |