Re: clang's static checker report.

Поиск
Список
Период
Сортировка
От Grzegorz Jaskiewicz
Тема Re: clang's static checker report.
Дата
Msg-id 3CD58E90-0CD4-4E8E-A3C8-2EF250D9E28F@pointblue.com.pl
обсуждение исходный текст
Ответ на Re: clang's static checker report.  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
On 23 Aug 2009, at 17:41, Greg Stark wrote:

> On Sun, Aug 23, 2009 at 4:57 PM, Grzegorz Jaskiewicz<gj@pointblue.com.pl 
> > wrote:
>> I am sure there's plenty of false positives, but I am also quite sure
>> there's many real errors on that list.
>
> Do you know how to teach clang about functions which never return?
> That seems to be causing most of the false positives because it
> doesn't recognize that our error checks stop execution and avoid the
> use of the unitialized variables afterwards.

I am not the clang developer, so I honestly have no idea how to do it.  
But as far as I checked report myself, there's couple 'division by  
zero', and 'null reference'  errors that looked plausible to someone  
as unfamiliar with the postgresql's source as myself.
Like with all static checkers, this one will generate a lot of false  
positives, and it is the inevitable cost of using such a tool having  
to go through all errors and sieve out positives yourself.

You probably refer to the functions that never return. Sadly, even tho  
llvm clang is capable of doing so (one of its strengths is linking  
optimization) - the checker is unable to cross reference files, or so  
it seems.

Well, like I said - l hope at least part of that report is useful.





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

Предыдущее
От: Roger Leigh
Дата:
Сообщение: Re: [PATCH 5/6] psql: print_aligned_text uses table formatting
Следующее
От: Grzegorz Jaskiewicz
Дата:
Сообщение: Re: clang's static checker report.