
On 6 Nov 2013, at 18:25, Stefan Behnel <stefan_ml@behnel.de> wrote:
Stefan Behnel, 06.11.2013 18:36:
Brian Bird, 06.11.2013 16:01:
Could anyone confirm if this is really a bug?
Definitely. Thanks for investigating it, and sorry for not responding earlier. Your short test code makes this very easy to reproduce, and Amaury's hint at the XPath parser dict should make it easy to track down the problem in the code.
https://github.com/lxml/lxml/commit/f7d2682a511253445c128137f205bfb4d6973cbb
It turned out that the parser dict setup risked using the wrong dict anyway, so the safest fix was to not use a dictionary at all.
Would this be likely to cause a memory leak in non-threaded code? I've been investigating a memory leak in an application that makes very heavy use of lxml, and I would be delighted if this was the cause. Thanks Ed