Re: remove contrib/xml2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: M Z <jm80008(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: remove contrib/xml2
Date: 2010-02-18 15:38:43
Message-ID: 20337.1266507523@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Then if you look at xpath.c in contrib/xml2 you notice that it's doing
> exactly the thing that the core module says it's unreliable: using
> palloc and friends in xmlMemSetup. So to fix the bug what's needed is
> that the xmlMemSetup call in contrib is removed altogether, and all
> memory is tracked and released by hand. It's rather tedious, and it's
> also difficult to plug all resulting memory leaks. But AFAIUI doing
> that would fix (some of?) the crashes. Not sure if your crash is in
> this category.

FWIW, the core xml code seems to have been pretty stable since we gave
up on trying to redirect libxml's memory allocations to palloc.
So what you basically need to do to xpath.c is something like this:
http://archives.postgresql.org/pgsql-committers/2009-05/msg00229.php

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2010-02-18 15:52:48 Re: remove contrib/xml2
Previous Message Bruce Momjian 2010-02-18 15:30:46 Re: A thought: should we run pgindent now?