Re: clang's static checker report.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: clang's static checker report.
Дата
Msg-id 13898.1251649756@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: clang's static checker report.  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: drop tablespace error: invalid argument
Следующее
От: Tom Lane
Дата:
Сообщение: Re: clang's static checker report.