Re: unchecked out of memory in postmaster.c

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unchecked out of memory in postmaster.c
Date: 2009-04-07 01:11:13
Message-ID: 20090407011113.GO4525@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > I think a patch to solve this is as simple as the attached.
>
> I guess I need to point out that those ereport calls already pose a far
> more substantial risk of palloc failure than the DLNewElem represents.

Hmm, do they? I mean, don't they use ErrorContext, which is supposed to
be preallocated?

> You seem to have forgotten about releasing the DLElem if the fork fails,
> too.

Doh, sorry about that.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-04-07 01:19:55 Re: unchecked out of memory in postmaster.c
Previous Message David E. Wheeler 2009-04-07 00:54:53 Re: A renewed plea for inclusion of zone.tab