Re: Error in recent pg_dump change (coverity)

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error in recent pg_dump change (coverity)
Date: 2006-05-28 17:42:41
Message-ID: 20060528174241.GD15766@surnet.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:

> Done. They were actually four, not five. The one I mistakingly though
> was one was the notice processor hooks.
>
> The case Martijn was saying would be warned about by the memset
> approach, setting ntuples to 0, would actually be handled as a segfault,
> because functions like check_field_number actually follow
> res.noticeHooks pointer! ISTM we would just segfault at that point.

I must be blind. The hooks->noticeRec == NULL case is handled first
thing in pgInternalNotice (returns doing nothing). So we wouldn't
segfault and we wouldn't emit any warning either!

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2006-05-28 17:53:35 COPY FROM view
Previous Message Bruce Momjian 2006-05-28 17:40:09 Re: Error in recent pg_dump change (coverity)