Re: sparse (static analyzer) report

Поиск
Список
Период
Сортировка
От Mark Wong
Тема Re: sparse (static analyzer) report
Дата
Msg-id 20050114175030.A14556@osdl.org
обсуждение исходный текст
Ответ на Re: sparse (static analyzer) report  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: sparse (static analyzer) report  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список pgsql-hackers
On Fri, Jan 14, 2005 at 09:54:24PM -0300, Alvaro Herrera wrote:
> On Fri, Jan 14, 2005 at 03:53:09PM -0800, Mark Wong wrote:
> > On Thu, Jan 13, 2005 at 03:09:19PM -0800, Mark Wong wrote:
> > > On Thu, Jan 13, 2005 at 08:06:23PM -0300, Alvaro Herrera wrote:
> > > > On Thu, Jan 13, 2005 at 01:31:36PM -0800, Mark Wong wrote:
> > > > > We've also started automating sparse analyses in our PLM tool, which
> > > > > will show an error and warning count.  Here's an example:
> 
> >     http://developer.osdl.org/markw/pgsql/sparse/pg-8.0rc5.html
> 
> Hmm.  Well, it showed the multiple incorrect uses of 0 as NULL in
> dllist.c and other places, but there's still lots of spurious entries.
> See backend/transam/xlog.c: it's strange that the parser is so confused
> about XLogCtrl, for example.

I'm sure there are a number of false positives, if that's what you're
getting at.

> It's complaining in several places about function as variables in
> function declarations (the multiple walkers and mutators for example);
> not sure how correct that is.
> 
> It is also analyzing flex and bison output files ... is it capable of
> analyzing .y and .l files instead?

Yeah, I generate the file list to run sparse against with a
"find . -name '*.c'".  So that's simple enough.  But flex and bison
files don't end in .c, do they?

> It's strange that DatumGetInt32 shows as a undefined identifier ...
> there's some problem with postgres.h apparently.  And fmgroids.h is
> missing; not sure what's the minimal make target to install it, because
> make -C src/backend/utils fmgroids.h
> generates it, but the symbolic link to src/include/utils is still
> needed.

Perhaps part of this has to do with my rather blind selection of files
to run sparse against.  For example, you still have to run configure
first and it probably doesn't make sense to run on some of the files
in ports.  I did notice one of the files complained about missing
Windows.h. :)

Mark


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: sparse (static analyzer) report
Следующее
От: Neil Conway
Дата:
Сообщение: Re: sparse (static analyzer) report