Re: [HACKERS] compile warning in CVS HEAD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] compile warning in CVS HEAD
Date: 2004-03-19 00:35:47
Message-ID: 14895.1079656547@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> Patch attached. Also adds a malloc() check that Neil wanted.

Er, what on God's green earth is elog.c doing malloc'ing stuff at all?
This should be a palloc in the ErrorContext; that's what it's for.
As is, this code is guaranteed to fail under out-of-memory conditions.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-03-19 00:39:56 Re: UnixWare/CVS Tip/initdb.c needs to use threads flags...
Previous Message Tom Lane 2004-03-19 00:30:10 Re: Bug in CVS HEAD on bootparse.y???

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-19 00:39:56 Re: UnixWare/CVS Tip/initdb.c needs to use threads flags...
Previous Message Larry Rosenman 2004-03-19 00:05:35 Re: UnixWare/CVS Tip/initdb.c needs to use threads flags...