[xml] crash with SAXParseFile




- I downloaded libxml2-2.6.3.tar.gz today December 10th.
- built it on Mac OS X 10.3.1 with:
  ./configure --with-python=/Library/Frameworks/Python.framework/Versions/2.3

- when I run the python code attached in file t21.py, I get a bus error.

I tracked it down to an inconsistency between usage of ctxt->_private and
ctxt->userData. The xmlSAXParseFileWithData function in parser.c only sets
ctxt->_private, yet further down the xmlParseDocument function calls
ctxt->sax->startDocument(ctxt->userData), which ultimately causes the
pythonStartDocument function in python/libxml.c to call PyObject_HasAttrString
with a bogus handler argument and the process to crash with a bus error.

By inserting at line 11535 in parser.c, ctxt->userData = data, the crash is
worked around and SAX parsing from python seems to work again.

Andi..

Attachment: t21.py
Description: t21.py

Attachment: cineguide.pack
Description: cineguide.pack



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