Skip site navigation (1) Skip section navigation (2)

Re: BUG #3860: xpath crashes backend when is querying xmlagg result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Sokolov Yura <funny(dot)falcon(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org, Peter Eisentraut <peter_e(at)gmx(dot)net>, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: BUG #3860: xpath crashes backend when is querying xmlagg result
Date: 2008-01-11 03:48:17
Message-ID: 5395.1200023297@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Tom Lane escribi:
>> One thing I was wondering about earlier today is whether libxml isn't
>> expecting NULL-return-on-failure from the malloc-substitute routine.
>> If we take control away from it unexpectedly, I wouldn't be a bit
>> surprised if its data structures are left corrupt.  This might lead to
>> failures during cleanup.

> Hmm, this is a very good point.  I quick look at the source shows that
> they are not very consistent on its own checking for memory allocation
> errors.  For example, see a bug I just reported:
> http://bugzilla.gnome.org/show_bug.cgi?id=508662

Ugh.  So we're pretty much damned if we do and damned if we don't.

Given what you showed, it is certain that we are at risk if we return
NULL, whereas it is merely hypothetical that we are at risk if we
longjmp.  So let's stick to the palloc infrastructure for now.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2008-01-11 05:08:14
Subject: Re: BUG #3865: ERROR: failed to build any 8-way joins
Previous:From: Alvaro HerreraDate: 2008-01-11 03:41:40
Subject: Re: BUG #3860: xpath crashes backend when is queryingxmlagg result

pgsql-patches by date

Next:From: Simon RiggsDate: 2008-01-11 08:26:31
Subject: Re: Revised patch for fixing archiver shutdown behavior
Previous:From: Alvaro HerreraDate: 2008-01-11 03:41:40
Subject: Re: BUG #3860: xpath crashes backend when is queryingxmlagg result

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group