Re: remove contrib/xml2 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: remove contrib/xml2
Date
Msg-id 20337.1266507523@sss.pgh.pa.us
Whole thread Raw
In response to Re: remove contrib/xml2  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: remove contrib/xml2
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: A thought: should we run pgindent now?
Next
From: Dimitri Fontaine
Date:
Subject: Re: remove contrib/xml2