[lxml-dev] Test failures on Windows

Sidnei da Silva sidnei at awkly.org
Sat Oct 28 15:07:19 CEST 2006


On Sat, Oct 28, 2006 at 10:05:14AM +0200, Stefan Behnel wrote:
| You got me convinced. I think that's because we are using the context reusing
| calls (xmlCtxt*). They require calling xmlCtxtReset afterwards to clean up
| both the input stack and memory resources. This is normally called
| automatically when using the parser context the next time (which is why there
| never were any enduring side effects), but waiting for that has the temporal
| side effect of leaving the input stream open when passing control back to the
| user code.
|
| Now, the problem is, running xmlCtxtReset can currently segfault in some
| cases, so we can't just call it carelessly. I played with it a bit to figure
| out in which cases it can be called, but it doesn't look like we can safely
| call it in every case where it would make sense. Guess I'll file a bug report
| on it and try to come up with a work-around...

Erm.... did you look at the attached patch? It just frees ctxt->input
if its not NULL. I guess you're looking for a generic fix though.

-- 
Sidnei da Silva
Enfold Systems                http://enfoldsystems.com
Fax +1 832 201 8856     Office +1 713 942 2377 Ext 214


More information about the lxml-dev mailing list