Re: [HACKERS] compile warning in CVS HEAD - Mailing list pgsql-patches

From Tom Lane
Subject Re: [HACKERS] compile warning in CVS HEAD
Date
Msg-id 14895.1079656547@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] compile warning in CVS HEAD  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: [HACKERS] compile warning in CVS HEAD  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.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

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: syntax error position "CREATE FUNCTION" bug fix
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] compile warning in CVS HEAD