Re: [xml] xpathEval namespace axis corruption/segfault

On 12/03/2008, Daniel Veillard <veillard redhat com> wrote:
On Mon, Mar 10, 2008 at 06:43:02PM -0700, William M. Brack wrote:
 > I traced through quite a bit, and was able to isolate where and what
 > the problem is.  Unfortunately, I can't spend much time on libxml2
 > for the next couple of weeks, so I have opened a bug
 > ( which describes
 > how far I got with it.

  yup, agreed with your analysis. That the only case where nodes returned
 from an XPath query do not pertain to the document and hence have a different

 > Perhaps another list member may be able to pursue this?  Python
 > bindings are always fun to work on....

  I managed to find a minimalist but correct way to fix this, basically
 get python to destroy the namespace node when it garbage collect the
 associated python object and remove it from the nodeset before it is being
 freed, this seems to work quite well actually. Patch attached, I will also
 commit a specific regression test. Note that libxslt/python/types.c need
 to be patched too.


Thanks to William for chasing this down and Daniel for patching it.
There are some errors in my report, but I can look forward to the next
libxml2 release for this to be resolved, thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]