Re: Coverity Open Source Defect Scan of PostgreSQL

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ben Chelf <ben(at)coverity(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Coverity Open Source Defect Scan of PostgreSQL
Date: 2006-03-10 10:02:29
Message-ID: 20060310100229.GC25494@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 08, 2006 at 10:34:38PM -0800, Ben Chelf wrote:
> On 3/8/06, Josh Berkus <josh ( at ) agliodbs ( dot ) com> wrote:
>
> > Actually, I thougth that Neil/eDB did this with their copy. Is
> > there any way to get a copy of that "training configuration"?
>
>
> Just to jump in on this thread, we can absolutely configure elog -- if
> you have the config already, great. If not, if you can just send me the
> prototype/macro expansion for 'elog' and the constant values that are
> passed in the case where it exits, I'll add that config. Thanks!

I don't know it anyone has responded to this but it works as follows.
the actual source can be seen here:

http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/elog.h?rev=1.82

elog expands to elog_finish, which doesn't return if the first argument
is >= ERROR (which is the number 20).

ereport(X) is more complex. You want the first argument of that but it
expands to something similar to:

errstart(X), errfinish()

if X >= ERROR in the call to errstart, errfinish doesn't return.

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bernd Helmle 2006-03-10 10:21:45 Proposal for updatable views
Previous Message Martijn van Oosterhout 2006-03-10 09:44:33 Re: Merge algorithms for large numbers of "tapes"