Re: Coverity Open Source Defect Scan of PostgreSQL

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Coverity Open Source Defect Scan of PostgreSQL
Дата
Msg-id 200603091313.k29DDHA25483@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Coverity Open Source Defect Scan of PostgreSQL  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Coverity Open Source Defect Scan of PostgreSQL  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-hackers
Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Wed, Mar 08, 2006 at 06:42:45PM -0500, Greg Stark wrote:
> > Ben Chelf <ben@coverity.com> writes:
> > 
> > > >>>#ifdef STATIC_ANALYSIS
> > > >>>#define ereport(elevel, rest)  \
> > > >>>        (errstart(elevel, __FILE__, __LINE__, PG_FUNCNAME_MACRO) ? \
> > > >>>         (errfinish rest) : (void) 0), (elevel >= ERROR ? exit(0) : 0)
> > > >>>#else
> > > >>>/* Normal def */
> > > >>>#endif
> > > 
> > > As for Coverity, if the elevel that's passed to the ereport is really a
> > > constant, the above #ifdef should absolutely do the trick for us so we know to
> > > stop analyzing on that path...Let me know if it doesn't actually do that ;)
> > 
> > If you're willing to require elevel to always be a constant then why not just
> > tack on the (elevel >= ERROR ? exit(0) : 0) onto the end of the regular
> > definition of ereport instead of having an ifdef?
> 
> Well, the only cost would be a useless call to exit() for each
> elog/ereport with an elevel >= ERROR. It bloats the binary a bit. Not
> sure whether people care enough about that.

We care.  :-)

--  Bruce Momjian   http://candle.pha.pa.us SRA OSS, Inc.   http://www.sraoss.com
 + If your life is a hard drive, Christ can be your backup. +


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove Christof Petig copyright on include file,
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Remove Christof Petig copyright on include file,