Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-05 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of lun jul 04 11:12:32 -0400 2011: Excerpts from Heikki Linnakangas's message of lun jul 04 09:14:11 -0400 2011: On 04.07.2011 16:07, Peter Geoghegan wrote: That error message is bogus anyway: if (!found) ereport(ERROR,

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Magnus Hagander
On Sat, Jul 2, 2011 at 20:10, Michael Mueller mmuel...@vigilantsw.com wrote: Hi folks, Sentry found this error last night, and it looks serious enough to report.  The error was introduced in commit 426cafc.  Here's the code in question, starting at line 2096:    if (!found)    {        

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Peter Geoghegan
On 4 July 2011 13:53, Magnus Hagander mag...@hagander.net wrote: This code is no longer present in git head, *removed* by commit 426cafc. Not added by it. at least that's how I read the history... However, it still looks to me like we could get to that code with con=NULL - if the while loop

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Heikki Linnakangas
On 04.07.2011 16:07, Peter Geoghegan wrote: On 4 July 2011 13:53, Magnus Hagandermag...@hagander.net wrote: This code is no longer present in git head, *removed* by commit 426cafc. Not added by it. at least that's how I read the history... However, it still looks to me like we could get to

Re: [HACKERS] Potential NULL dereference found in typecmds.c

2011-07-04 Thread Alvaro Herrera
Excerpts from Heikki Linnakangas's message of lun jul 04 09:14:11 -0400 2011: On 04.07.2011 16:07, Peter Geoghegan wrote: That error message is bogus anyway: if (!found) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg(constraint