Paul Everitt wrote:
I can happily report a test case for my malloc problems and segfault. :^) I'm on OS X, Python 2.4. The runpipeline.py in this SVN directory:
http://codespeak.net/svn/z3/deliverance/trunk/lib/
...works fine with lxml 0.8 but fails quite badly with the trunk. Specifically, in line 120 of:
http://codespeak.net/svn/z3/deliverance/trunk/lib/runpipeline.py
...I have:
resultdoc = processor.apply(contentdoc)
Sorry, I can't reproduce that. I seem to be missing some files, so I can't run the script completely.
I also noted, just by trying to limit the problem to a smaller test case, that applying a stylesheet repeatedly leads to an unusual problem. As shown below, all is fine, unless you re-use the same variable name for the transformation output:
It isn't that easy. Simply reusing the variable doesn't trigger a problem on my side. It seems to also depend on the stylesheet you use. Anyway, when I run your runpipeline.py through valgrind (as far as it runs), it brings up a problem in the changeDocumentBelow function, that calls the namespace reconsiliation functions of libxml2. You do an element.append somewhere and that seems to trigger it. I think it's this line: themeroot.append(copy.deepcopy(themedoc.getroot())) Maybe you can do some more testing, I'll also see what I can come up with. If you want to run valgrind yourself, use the command line from doc/valgrind.txt Stefan